summaryrefslogtreecommitdiff
path: root/src/preload/index.ts
diff options
context:
space:
mode:
authorhaoyuren <13851610112@163.com>2026-03-15 13:41:14 -0500
committerhaoyuren <13851610112@163.com>2026-03-15 13:41:14 -0500
commit3a1ad20d63f7d96dd6b4aee92b2851b3a35a8d92 (patch)
tree1cbcbb9f1af46384caaa1450979e098a3a29c76d /src/preload/index.ts
parent0b2431faad5271e4721fcf7f96917b1a314120b3 (diff)
v0.3.2: Add search features and SyncTeX forward searchv0.3.2
- In-file search: Cmd+F opens CodeMirror search panel with themed styling - Multi-file search: Cmd+Shift+F or toolbar button opens project-wide search - PDF text search: Cmd+F on PDF or search button to find text in PDF - SyncTeX forward search: Cmd+Enter jumps from editor cursor to PDF position Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'src/preload/index.ts')
-rw-r--r--src/preload/index.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/preload/index.ts b/src/preload/index.ts
index 649c3aa..6bdcdbb 100644
--- a/src/preload/index.ts
+++ b/src/preload/index.ts
@@ -41,6 +41,12 @@ const api = {
// SyncTeX
synctexEdit: (pdfPath: string, page: number, x: number, y: number) =>
ipcRenderer.invoke('synctex:editFromPdf', pdfPath, page, x, y) as Promise<{ file: string; line: number } | null>,
+ synctexView: (line: number, col: number, relPath: string) =>
+ ipcRenderer.invoke('synctex:viewFromSource', line, col, relPath) as Promise<{ page: number; x: number; y: number; h: number; v: number; W: number; H: number } | null>,
+
+ // Multi-file search
+ searchFiles: (query: string, caseSensitive: boolean) =>
+ ipcRenderer.invoke('search:files', query, caseSensitive) as Promise<Array<{ file: string; line: number; content: string; col: number }>>,
// Overleaf web session (comments)
overleafWebLogin: () => ipcRenderer.invoke('overleaf:webLogin') as Promise<{ success: boolean }>,