Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/14290

Vanessacd5f93e2d6f4
diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts
index fd7054a72f..70155235b6 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++) {