Commit 060ca408 authored by Eli Zaretskii's avatar Eli Zaretskii

Avoid beginning/end of buffer errors when moving across display strings.

 lisp/simple.el (line-move-visual): Signal beginning/end of buffer
 only if vertical-motion moved less than it was requested.  Avoids
 silly incorrect error messages when there are display strings with
 multiple newlines at EOL.
parent 07525f77
2013-05-08 Eli Zaretskii <eliz@gnu.org>
* simple.el (line-move-visual): Signal beginning/end of buffer
only if vertical-motion moved less than it was requested. Avoids
silly incorrect error messages when there are display strings with
multiple newlines at EOL.
2013-05-08 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/vera-mode.el (vera-underscore-is-part-of-word):
......
......@@ -4857,13 +4857,25 @@ lines."
(frame-char-width)) hscroll))))))
(if target-hscroll
(set-window-hscroll (selected-window) target-hscroll))
(or (and (= (vertical-motion
(cons (or goal-column
(if (consp temporary-goal-column)
(car temporary-goal-column)
temporary-goal-column))
arg))
arg)
;; vertical-motion can move more than it was asked to if it moves
;; across display strings with newlines. We don't want to ring
;; the bell and announce beginning/end of buffer in that case.
(or (and (or (and (>= arg 0)
(>= (vertical-motion
(cons (or goal-column
(if (consp temporary-goal-column)
(car temporary-goal-column)
temporary-goal-column))
arg))
arg))
(and (< arg 0)
(<= (vertical-motion
(cons (or goal-column
(if (consp temporary-goal-column)
(car temporary-goal-column)
temporary-goal-column))
arg))
arg)))
(or (>= arg 0)
(/= (point) opoint)
;; If the goal column lies on a display string,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment