mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-02 06:48:49 +01:00
🚨
This commit is contained in:
parent
f15b2f8666
commit
b2b1089e3d
7 changed files with 27 additions and 22 deletions
|
|
@ -129,18 +129,18 @@ export const globalCommand = (command: string, app: App) => {
|
|||
let newItem: Tab;
|
||||
if (command === "goToEditTabPrev") {
|
||||
if (index === 0) {
|
||||
newItem = tabs[tabs.length - 1]
|
||||
newItem = tabs[tabs.length - 1];
|
||||
} else {
|
||||
newItem = tabs[index - 1]
|
||||
newItem = tabs[index - 1];
|
||||
}
|
||||
} else {
|
||||
if (index === tabs.length - 1) {
|
||||
newItem = tabs[0]
|
||||
newItem = tabs[0];
|
||||
} else {
|
||||
newItem = tabs[index + 1]
|
||||
newItem = tabs[index + 1];
|
||||
}
|
||||
}
|
||||
const tab = getInstanceById(newItem.id) as Tab
|
||||
const tab = getInstanceById(newItem.id) as Tab;
|
||||
tab.parent.switchTab(newItem.headElement);
|
||||
tab.parent.showHeading();
|
||||
}
|
||||
|
|
@ -229,9 +229,9 @@ export const globalCommand = (command: string, app: App) => {
|
|||
openHistory(app);
|
||||
return true;
|
||||
case "editReadonly":
|
||||
setReadOnly(!window.siyuan.config.editor.readOnly)
|
||||
setReadOnly(!window.siyuan.config.editor.readOnly);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,4 +25,4 @@ export const onluProtyleCommand = (options: {
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue