[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog simple.el
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog simple.el |
Date: |
Fri, 31 Jul 2009 02:14:48 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 09/07/31 02:14:47
Modified files:
lisp : ChangeLog simple.el
Log message:
* simple.el (line-move-visual): Perform hscroll to the recorded
position.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15873&r2=1.15874
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/simple.el?cvsroot=emacs&r1=1.1000&r2=1.1001
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15873
retrieving revision 1.15874
diff -u -b -r1.15873 -r1.15874
--- ChangeLog 31 Jul 2009 01:34:26 -0000 1.15873
+++ ChangeLog 31 Jul 2009 02:14:43 -0000 1.15874
@@ -2,6 +2,7 @@
* simple.el (line-move-finish): Pass whole number to
line-move-to-column.
+ (line-move-visual): Perform hscroll to the recorded position.
2009-07-30 Jay Belanger <address@hidden>
Index: simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.1000
retrieving revision 1.1001
diff -u -b -r1.1000 -r1.1001
--- simple.el 31 Jul 2009 01:34:30 -0000 1.1000
+++ simple.el 31 Jul 2009 02:14:46 -0000 1.1001
@@ -4092,29 +4092,30 @@
;; Arg says how many lines to move. The value is t if we can move the
;; specified number of lines.
(defun line-move-visual (arg &optional noerror)
- (let ((posn (posn-at-point))
- (opoint (point))
+ (let ((opoint (point))
(hscroll (window-hscroll))
- x)
+ target-hscroll)
;; Check if the previous command was a line-motion command, or if
;; we were called from some other command.
- (cond ((and (consp temporary-goal-column)
+ (if (and (consp temporary-goal-column)
(memq last-command `(next-line previous-line ,this-command)))
;; If so, there's no need to reset `temporary-goal-column',
- ;; unless the window hscroll has changed.
- (when (/= hscroll (cdr temporary-goal-column))
- (set-window-hscroll nil 0)
- (setq temporary-goal-column
- (cons (+ (car temporary-goal-column)
- (cdr temporary-goal-column)) 0))))
+ ;; but we may need to hscroll.
+ (if (or (/= (cdr temporary-goal-column) hscroll)
+ (> (cdr temporary-goal-column) 0))
+ (setq target-hscroll (cdr temporary-goal-column)))
;; Otherwise, we should reset `temporary-goal-column'.
+ (let ((posn (posn-at-point)))
+ (cond
;; Handle the `overflow-newline-into-fringe' case:
((eq (nth 1 posn) 'right-fringe)
(setq temporary-goal-column (cons (- (window-width) 1) hscroll)))
- ((setq x (car (posn-x-y posn)))
+ ((car (posn-x-y posn))
(setq temporary-goal-column
- (cons (/ (float x) (frame-char-width)) hscroll))))
- ;; Move using `vertical-motion'.
+ (cons (/ (float (car (posn-x-y posn)))
+ (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)
- [Emacs-diffs] emacs/lisp ChangeLog simple.el, Chong Yidong, 2009/07/11
- [Emacs-diffs] emacs/lisp ChangeLog simple.el, Stefan Monnier, 2009/07/14
- [Emacs-diffs] emacs/lisp ChangeLog simple.el, Chong Yidong, 2009/07/14
- [Emacs-diffs] emacs/lisp ChangeLog simple.el, Chong Yidong, 2009/07/18
- [Emacs-diffs] emacs/lisp ChangeLog simple.el, Chong Yidong, 2009/07/18
- [Emacs-diffs] emacs/lisp ChangeLog simple.el, Glenn Morris, 2009/07/21
- [Emacs-diffs] emacs/lisp ChangeLog simple.el, Chong Yidong, 2009/07/30
- [Emacs-diffs] emacs/lisp ChangeLog simple.el,
Chong Yidong <=