branch: elpa/annotate commit ed6a7dd7ccd6c784b4d44438c1314b3b5f81dbb9 Author: cage <cage-invalid@invalid> Commit: cage <cage-invalid@invalid>
- prevented fails of fontification of annotated regions As we walk across the overlays we can get past the limit, the best i figured out to fix that was to check point even before regexp matching. --- annotate.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/annotate.el b/annotate.el index 884424ed06..721a4e7d55 100644 --- a/annotate.el +++ b/annotate.el @@ -648,7 +648,8 @@ annotation plus the newline." ;; capture the area from the overlay to EOL (regexp match #1) ;; for the modification guard and the newline itself (regexp ;; match #2) for the annotation. - (re-search-forward "\\(.*\\(\n\\)\\)" limit t)))) + (when (< (point) limit) + (re-search-forward "\\(.*\\(\n\\)\\)" limit t))))) (cl-defstruct annotate-group words