From cd5f93e2d6f42bc7cc1ad4714b463aac00a381bf Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 6 May 2025 22:37:20 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/14290 --- app/src/protyle/toolbar/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index fd7054a72..70155235b 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -601,7 +601,11 @@ export class Toolbar { for (let i = newNodes.length - 1; i > -1; i--) { this.range.insertNode(newNodes[i]); } - + // 不选中后,ctrl+g 光标重置 + if (newNodes.length === 1 && newNodes[0].textContent === Constants.ZWSP) { + this.range.setStart(newNodes[0], 1); + this.range.collapse(true); + } if (!keepZWPS) { // 合并元素 for (let i = 0; i <= newNodes.length; i++) {