mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-29 19:56:10 +01:00
This commit is contained in:
parent
0b6b729ab5
commit
233b64e85d
4 changed files with 18 additions and 7 deletions
|
|
@ -10,7 +10,7 @@ import {
|
|||
openFileAttr,
|
||||
} from "../../menus/commonMenuItem";
|
||||
/// #if !BROWSER
|
||||
import {getCurrentWindow} from "@electron/remote";
|
||||
import { ipcRenderer } from "electron";
|
||||
/// #endif
|
||||
import {Constants} from "../../constants";
|
||||
import {matchHotKey} from "../util/hotKey";
|
||||
|
|
@ -99,13 +99,13 @@ export class Title {
|
|||
}
|
||||
/// #if !BROWSER
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.undo.custom, event)) {
|
||||
getCurrentWindow().webContents.undo();
|
||||
ipcRenderer.send(Constants.SIYUAN_CMD, "undo");
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.redo.custom, event)) {
|
||||
getCurrentWindow().webContents.redo();
|
||||
ipcRenderer.send(Constants.SIYUAN_CMD, "redo");
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue