branch: externals/beardbolt commit d187b8b189e70b841f7cd3aaf880a878be7e7612 Author: Jay Kamat <jaygka...@gmail.com> Commit: Jay Kamat <jaygka...@gmail.com>
Optimize guide display when many line blocks found --- rmsbolt.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rmsbolt.el b/rmsbolt.el index 0bc73b4f8d..ba05d2123f 100644 --- a/rmsbolt.el +++ b/rmsbolt.el @@ -1164,10 +1164,11 @@ Argument OVERRIDE-BUFFER use this buffer instead of reading from the output file o)) (cl-defun rmsbolt--point-visible (point) "Check if the current point is visible in a window in the current buffer." - (dolist (w (get-buffer-window-list)) - (when (pos-visible-in-window-p point w) - (cl-return-from rmsbolt--point-visible t))) - nil) + (when (cl-find-if (lambda (w) + (and (>= point (window-start w)) + (<= point (window-end w)))) + (get-buffer-window-list)) + t)) (defun rmsbolt-move-overlays () "Function for moving overlays for rmsbolt."