branch: elpa/pdf-tools
commit b83478202a89dc1fbed682a95766fc40233ae140
Author: Philipp G. Haselwarter <[email protected]>
Commit: GitHub <[email protected]>
fix: use absolute line number in pdf-sync
`line-number-at-pos` should be called with second argument `absolute` set
to `t` in order for `pdf-sync-forward-correlate` to work in buffers with active
narrowing.
---
lisp/pdf-sync.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/pdf-sync.el b/lisp/pdf-sync.el
index cfbc2a3bc1e..68de3b90598 100644
--- a/lisp/pdf-sync.el
+++ b/lisp/pdf-sync.el
@@ -670,7 +670,7 @@ Returns a list \(PDF PAGE X1 Y1 X2 Y2\), where PAGE, X1,
Y1, X2
and Y2 may be nil, if the destination could not be found."
(unless (fboundp 'TeX-master-file)
(error "This function works only with AUCTeX"))
- (unless line (setq line (line-number-at-pos)))
+ (unless line (setq line (line-number-at-pos nil t)))
(unless column (setq column (current-column)))
(let* ((pdf (expand-file-name