mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-04 08:47:11 +00:00
(line-move-1): Always use vertical-motion to
do the last (or only) line move to ensure some movement. Undo 2005-06-23 change--don't check for overlays.
This commit is contained in:
parent
010b9a45b1
commit
6a8b26dcd5
@ -3447,14 +3447,13 @@ Outline mode sets this."
|
|||||||
(signal 'end-of-buffer nil)
|
(signal 'end-of-buffer nil)
|
||||||
(setq done t)))
|
(setq done t)))
|
||||||
(when (and (not done)
|
(when (and (not done)
|
||||||
|
(> arg 1) ;; Use vertical-motion for last move
|
||||||
(not (integerp selective-display))
|
(not (integerp selective-display))
|
||||||
(not (line-move-invisible-p (point))))
|
(not (line-move-invisible-p (point))))
|
||||||
(unless (overlays-in (max (1- pos-before) (point-min))
|
;; We avoid vertical-motion when possible
|
||||||
(min (1+ (point)) (point-max)))
|
;; because that has to fontify.
|
||||||
;; We avoid vertical-motion when possible
|
(forward-line 1)
|
||||||
;; because that has to fontify.
|
(setq line-done t))
|
||||||
(forward-line 1)
|
|
||||||
(setq line-done t)))
|
|
||||||
(and (not done) (not line-done)
|
(and (not done) (not line-done)
|
||||||
;; Otherwise move a more sophisticated way.
|
;; Otherwise move a more sophisticated way.
|
||||||
(zerop (vertical-motion 1))
|
(zerop (vertical-motion 1))
|
||||||
@ -3474,12 +3473,11 @@ Outline mode sets this."
|
|||||||
(signal 'beginning-of-buffer nil)
|
(signal 'beginning-of-buffer nil)
|
||||||
(setq done t)))
|
(setq done t)))
|
||||||
(when (and (not done)
|
(when (and (not done)
|
||||||
|
(< arg -1) ;; Use vertical-motion for last move
|
||||||
(not (integerp selective-display))
|
(not (integerp selective-display))
|
||||||
(not (line-move-invisible-p (1- (point)))))
|
(not (line-move-invisible-p (1- (point)))))
|
||||||
(unless (overlays-in (max (1- (point)) (point-min))
|
(forward-line -1)
|
||||||
(min (1+ pos-before) (point-max)))
|
(setq line-done t))
|
||||||
(forward-line -1)
|
|
||||||
(setq line-done t)))
|
|
||||||
(and (not done) (not line-done)
|
(and (not done) (not line-done)
|
||||||
(zerop (vertical-motion -1))
|
(zerop (vertical-motion -1))
|
||||||
(if (not noerror)
|
(if (not noerror)
|
||||||
|
Loading…
Reference in New Issue
Block a user