From d177a2f2a7451a7d13d2eb735a10ffa02a1822d9 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 25 Sep 2025 21:36:19 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/15937 --- app/src/protyle/gutter/index.ts | 55 ++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts index 87088d997..72108a37b 100644 --- a/app/src/protyle/gutter/index.ts +++ b/app/src/protyle/gutter/index.ts @@ -1855,31 +1855,36 @@ export class Gutter { } } window.siyuan.menus.menu.append(new MenuItem({ - id: "jumpToParentPrev", - label: window.siyuan.languages.jumpToParentPrev, - accelerator: window.siyuan.config.keymap.editor.general.jumpToParentPrev.custom, - click() { - hideElements(["select"], protyle); - jumpToParent(protyle, nodeElement, "previous"); - } - }).element); - window.siyuan.menus.menu.append(new MenuItem({ - id: "jumpToParentNext", - label: window.siyuan.languages.jumpToParentNext, - accelerator: window.siyuan.config.keymap.editor.general.jumpToParentNext.custom, - click() { - hideElements(["select"], protyle); - jumpToParent(protyle, nodeElement, "next"); - } - }).element); - window.siyuan.menus.menu.append(new MenuItem({ - id: "jumpToParent", - label: window.siyuan.languages.jumpToParent, - accelerator: window.siyuan.config.keymap.editor.general.jumpToParent.custom, - click() { - hideElements(["select"], protyle); - jumpToParent(protyle, nodeElement, "parent"); - } + type: "submenu", + label: window.siyuan.languages.jumpTo, + submenu: [{ + id: "jumpToParentPrev", + iconHTML: "", + label: window.siyuan.languages.jumpToParentPrev, + accelerator: window.siyuan.config.keymap.editor.general.jumpToParentPrev.custom, + click() { + hideElements(["select"], protyle); + jumpToParent(protyle, nodeElement, "previous"); + } + }, { + iconHTML: "", + id: "jumpToParentNext", + label: window.siyuan.languages.jumpToParentNext, + accelerator: window.siyuan.config.keymap.editor.general.jumpToParentNext.custom, + click() { + hideElements(["select"], protyle); + jumpToParent(protyle, nodeElement, "next"); + } + }, { + iconHTML: "", + id: "jumpToParent", + label: window.siyuan.languages.jumpToParent, + accelerator: window.siyuan.config.keymap.editor.general.jumpToParent.custom, + click() { + hideElements(["select"], protyle); + jumpToParent(protyle, nodeElement, "parent"); + } + }] }).element); window.siyuan.menus.menu.append(new MenuItem({id: "separator_3", type: "separator"}).element);