(highlight: HighlightInfo)
| 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() { |