mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
This commit is contained in:
@@ -810,7 +810,7 @@ export const globalShortcut = (app: App) => {
|
||||
app.plugins.find(item => {
|
||||
item.commands.find(command => {
|
||||
if (command.callback &&
|
||||
!command.fileTreeCallback && !command.editorCallback&& !command.dockCallback
|
||||
!command.fileTreeCallback && !command.editorCallback && !command.dockCallback
|
||||
&& matchHotKey(command.customHotkey, event)) {
|
||||
matchCommand = true;
|
||||
command.callback();
|
||||
@@ -1071,7 +1071,7 @@ const editKeydown = (app: App, event: KeyboardEvent) => {
|
||||
selectElements = [nodeElement];
|
||||
}
|
||||
movePathTo((toPath) => {
|
||||
hintMoveBlock(toPath[0], selectElements, protyle);
|
||||
hintMoveBlock(toPath[0], selectElements, protyle, app);
|
||||
});
|
||||
}
|
||||
event.preventDefault();
|
||||
@@ -1084,7 +1084,7 @@ const editKeydown = (app: App, event: KeyboardEvent) => {
|
||||
return false;
|
||||
}
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.refresh.custom, event)) {
|
||||
reloadProtyle(protyle, true);
|
||||
reloadProtyle(protyle, app, true);
|
||||
event.preventDefault();
|
||||
return true;
|
||||
}
|
||||
@@ -1106,19 +1106,19 @@ const editKeydown = (app: App, event: KeyboardEvent) => {
|
||||
id: protyle.block.parentID,
|
||||
size: window.siyuan.config.editor.dynamicLoadBlocks,
|
||||
}, getResponse => {
|
||||
onGet(getResponse, protyle);
|
||||
onGet({data: getResponse, protyle, app});
|
||||
});
|
||||
event.preventDefault();
|
||||
return true;
|
||||
}
|
||||
// 没有光标时,无法撤销 https://ld246.com/article/1624021111567
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.undo.custom, event)) {
|
||||
protyle.undo.undo(protyle);
|
||||
protyle.undo.undo(app, protyle);
|
||||
event.preventDefault();
|
||||
return true;
|
||||
}
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.redo.custom, event)) {
|
||||
protyle.undo.redo(protyle);
|
||||
protyle.undo.redo(app, protyle);
|
||||
event.preventDefault();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user