emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/evil 24c9c4255a: `evil-jump-item': don't error at `point-m


From: ELPA Syncer
Subject: [nongnu] elpa/evil 24c9c4255a: `evil-jump-item': don't error at `point-max'
Date: Tue, 10 Jan 2023 09:58:56 -0500 (EST)

branch: elpa/evil
commit 24c9c4255a27f9d87b880d2ba4fd1d7df4502075
Author: Nikita Bloshchanevich <nikblos@outlook.com>
Commit: Axel Forsman <axelsfor@gmail.com>

    `evil-jump-item': don't error at `point-max'
    
    `evil-jump-item' internally calls `evil-looking-at-start-comment', which
    fails at `point-max' because it checks `char-after' using `char-syntax'. 
Return
    nil in it if `point' = `point-max', because a comment cannot start at the 
end of
    the buffer (it would be 0 characters long).
---
 evil-common.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/evil-common.el b/evil-common.el
index 02d86806cd..fef5b18a69 100644
--- a/evil-common.el
+++ b/evil-common.el
@@ -1861,6 +1861,7 @@ won't be considered as comment starters inside a string or
 possibly another comment. Point is moved to the first character
 of the comment opener if MOVE is non-nil."
   (cond
+   ((= (point) (point-max)) nil)
    ;; one character opener
    ((= (char-syntax (char-after)) ?<)
     (equal (point) (evil-in-comment-p (1+ (point)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]