[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112521: Avoid beginning/end of buffe
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112521: Avoid beginning/end of buffer errors when moving across display strings. |
Date: |
Wed, 08 May 2013 21:05:40 +0300 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 112521
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Wed 2013-05-08 21:05:40 +0300
message:
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.
modified:
lisp/ChangeLog
lisp/simple.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-05-08 16:27:53 +0000
+++ b/lisp/ChangeLog 2013-05-08 18:05:40 +0000
@@ -1,3 +1,10 @@
+2013-05-08 Eli Zaretskii <address@hidden>
+
+ * 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 <address@hidden>
* progmodes/vera-mode.el (vera-underscore-is-part-of-word):
=== modified file 'lisp/simple.el'
--- a/lisp/simple.el 2013-05-06 20:11:40 +0000
+++ b/lisp/simple.el 2013-05-08 18:05:40 +0000
@@ -4857,13 +4857,25 @@
(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,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112521: Avoid beginning/end of buffer errors when moving across display strings.,
Eli Zaretskii <=