🐛 fix(vscode): 代码阅读按 ⌘↓ 跳高亮不再来回闪,筛选栏加上上一处、下一处

This commit is contained in:
cruldra committed 2026-10-03 03:11:46 +08:00
1 parent 70a53e5a68
commit b16cc6409e
8 files changed
+221 -36

No files matched your search

+2 -1
View File
@@ -88,7 +88,7 @@ export function App(): ReactElement | null {
expand,
}
: undefined, [doc, unshown, covered, view.editing, collapsed, expand])
const highlight = useOccurrences(doc?.version, doc?.translatorId, occurrencePage)
const { highlight, moveOccurrence } = useOccurrences(doc?.version, doc?.translatorId, occurrencePage)
useEffect(() => {
const off = onMessage((msg) => {
@@ -164,6 +164,7 @@ export function App(): ReactElement | null {
excluded={excluded}
view={filter}
highlight={highlight}
onMoveOccurrence={moveOccurrence}
onChange={next => postMessage({ type: 'setFilter', excluded: next })}
translators={doc.translators}
translatorId={doc.translatorId}