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.)" ;; like display or overlay strings, intangible text, etc.: ;; otherwise, we don't want to kill a character that's ;; unrelated to the place where the visual line wraps. - (and (= (cdr (nth 6 (posn-at-point))) orig-vlnum) + (and (numberp (nth 6 (posn-at-point))) + (= (cdr (nth 6 (posn-at-point))) orig-vlnum) ;; Make sure we delete the character where the line wraps ;; under visual-line-mode, be it whitespace or a ;; character whose category set permits wrapping at it.