branch: main
commit 963c541a966be6c540efe3f7d78a2dbada3bd9d9
Author: Paul Nelson <[email protected]>
Commit: Arash Esbati <[email protected]>
Fix pdf-sync in narrowed buffers
* tex.el (TeX-pdf-tools-sync-view): `widen' before calling
`pdf-sync-forward-search'. (bug#73902)
---
tex.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tex.el b/tex.el
index 28aaed11..4e361e4c 100644
--- a/tex.el
+++ b/tex.el
@@ -1205,7 +1205,9 @@ entry in `TeX-view-program-list-builtin'."
(with-current-buffer (or (when TeX-current-process-region-p
(get-file-buffer (TeX-region-file t)))
(current-buffer))
- (pdf-sync-forward-search))
+ (save-restriction
+ (widen)
+ (pdf-sync-forward-search)))
(let ((pdf (TeX-active-master (TeX-output-extension))))
(pop-to-buffer (or (find-buffer-visiting pdf)
(find-file-noselect pdf))))))