branch: elpa/annotate commit cc4292cce4636e30c85fc3ef436553ce7d89de6a Author: cage <cage-invalid@invalid> Commit: cage <cage-invalid@invalid>
- moved the test for 'limit' up in the lambda of the filtering procedure. --- annotate.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/annotate.el b/annotate.el index 721a4e7d55..7a48ecad78 100644 --- a/annotate.el +++ b/annotate.el @@ -639,8 +639,11 @@ annotation plus the newline." nil ; no match found before limit (progn ;; go to the end of the longest annotation under point - (let ((overlays (sort (cl-remove-if-not 'annotationp - (overlays-at (point))) + (let ((overlays (sort (cl-remove-if (lambda (a) + (or (not (annotationp a)) + (> (overlay-end a) + limit))) + (overlays-at (point))) (lambda (x y) (> (overlay-end x) (overlay-end y)))))) (when overlays