merge feat/212-editor-git-gutter into dev(#212 编辑器变更提示:code 视图行号槽着色 + 左侧细色条 + hover blame,一个布尔开关,样式极简)

This commit is contained in:
Menghuan1918 committed 2026-10-05 22:32:26 +08:00
commit bce22cfaf1
37 files changed
+1376 -5

No files matched your search

+4 -1
View File
@@ -322,7 +322,10 @@ export function useGitStatus(
slot.listeners.add(listener)
return () => { slot.listeners.delete(listener) }
}, [slot])
useSyncExternalStore(subscribe, () => slot.version)
// The third argument (server snapshot) keeps a consumer that is rendered to
// a string alive — the editor does exactly that in the markdown specs, and
// the slot's version is 0 on both sides.
useSyncExternalStore(subscribe, () => slot.version, () => slot.version)
useEffect(() => {
slot.pollMs = pollMs