org-lint: Allow jumping outside narrowing when jumping to source

* lisp/org-lint.el (org-lint--jump-to-source): When buffer is
narrowed and the location to jump is outside the narrowing, widen.
This commit is contained in:
Ihor Radchenko 2023-08-17 12:50:52 +03:00
parent 2cf245810b
commit b2e34474f5
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 0 deletions

View File

@ -274,6 +274,7 @@ CHECKERS is the list of checkers used."
(interactive)
(let ((mk (org-lint--current-marker)))
(switch-to-buffer-other-window org-lint--source-buffer)
(unless (<= (point-min) mk (point-max)) (widen))
(goto-char mk)
(org-fold-show-set-visibility 'local)
(recenter)))