mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
fix delete with keyboard and context menu regarding the selection
This commit is contained in:
@@ -7,7 +7,13 @@ import clipboard from "./clipboard.js";
|
||||
|
||||
const keyBindings = {
|
||||
"del": node => {
|
||||
treeChangesService.deleteNodes(treeService.getSelectedNodes(true));
|
||||
let notesToDelete = treeService.getSelectedNodes(true);
|
||||
|
||||
if (notesToDelete.length === 0) {
|
||||
notesToDelete.push(node);
|
||||
}
|
||||
|
||||
treeChangesService.deleteNodes(notesToDelete);
|
||||
},
|
||||
"ctrl+up": node => {
|
||||
const beforeNode = node.getPrevSibling();
|
||||
|
||||
Reference in New Issue
Block a user