mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
fix delete with keyboard and context menu regarding the selection
This commit is contained in:
@@ -122,7 +122,13 @@ class TreeContextMenu {
|
||||
clipboard.pasteInto(this.node);
|
||||
}
|
||||
else if (cmd === "delete") {
|
||||
treeChangesService.deleteNodes(treeService.getSelectedNodes(true));
|
||||
let notesToDelete = treeService.getSelectedNodes(true);
|
||||
|
||||
if (notesToDelete.length === 0) {
|
||||
notesToDelete.push(this.node);
|
||||
}
|
||||
|
||||
treeChangesService.deleteNodes(notesToDelete);
|
||||
}
|
||||
else if (cmd === "export") {
|
||||
exportDialog.showDialog("subtree");
|
||||
|
||||
Reference in New Issue
Block a user