aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2025-12-14 10:18:34 +0200
committerEli Zaretskii2025-12-14 10:18:34 +0200
commitd481b9efdc65bb066e2c765ae76ab5aa93dc9541 (patch)
treef75056945d77683301d861cde21bb209a66a05d2
parent1880cd0aa544fa77bdbd1bb1870d8f8458b2b79c (diff)
downloademacs-d481b9efdc65bb066e2c765ae76ab5aa93dc9541.tar.gz
emacs-d481b9efdc65bb066e2c765ae76ab5aa93dc9541.zip
Fix a bug in 'kill-visual-line' that caused it signal an error
* lisp/simple.el (kill-visual-line): Don't assume 'posn-at-point' always returns a non-nil value. (Bug#80004)
-rw-r--r--lisp/simple.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 118fcb77502..6222608bbd0 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -8609,7 +8609,8 @@ even beep.)"
8609 ;; like display or overlay strings, intangible text, etc.: 8609 ;; like display or overlay strings, intangible text, etc.:
8610 ;; otherwise, we don't want to kill a character that's 8610 ;; otherwise, we don't want to kill a character that's
8611 ;; unrelated to the place where the visual line wraps. 8611 ;; unrelated to the place where the visual line wraps.
8612 (and (= (cdr (nth 6 (posn-at-point))) orig-vlnum) 8612 (and (numberp (nth 6 (posn-at-point)))
8613 (= (cdr (nth 6 (posn-at-point))) orig-vlnum)
8613 ;; Make sure we delete the character where the line wraps 8614 ;; Make sure we delete the character where the line wraps
8614 ;; under visual-line-mode, be it whitespace or a 8615 ;; under visual-line-mode, be it whitespace or a
8615 ;; character whose category set permits wrapping at it. 8616 ;; character whose category set permits wrapping at it.