MCPcopy Create free account
hub / github.com/CatMuse/HiNote / jumpToHighlight

Method jumpToHighlight

src/views/hinote/HiNoteView.ts:132–148  ·  view source on GitHub ↗
(highlight: HighlightInfo)

Source from the content-addressed store, hash-verified

130 }
131
132 private async jumpToHighlight(highlight: HighlightInfo) {
133 if (this.state.isDraggedToMainView) {
134 // 如果在视图中,则不执行转
135 return;
136 }
137
138 // 如果是全局搜索结果,静默禁止跳转
139 if (highlight.isGlobalSearch) {
140 return;
141 }
142
143 if (!this.state.currentFile) {
144 new Notice(t("No corresponding file found."));
145 return;
146 }
147 await this.locationService.jumpToHighlight(highlight, this.state.currentFile.path);
148 }
149
150 // 检查视图位置(使用 ViewPositionDetector)
151 private async checkViewPosition() {

Callers 2

onOpenMethod · 0.95
configureMethod · 0.45

Calls 1

tFunction · 0.90

Tested by

no test coverage detected