diff options
author | Noam Postavsky <npostavs@gmail.com> | 2018-06-10 18:43:49 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2018-06-10 18:43:49 -0400 |
commit | 7adf1a361db3a2e9b7a27d76946482276c24fb64 (patch) | |
tree | 32a993c24df839661f467ea54bd1000e68e2282b /lisp/simple.el | |
parent | 78ac2480d7bd206f3207398a31830bf0625caf0a (diff) | |
parent | 3434edc731e4602891a9cf6418ec4e5ff2f60830 (diff) | |
download | emacs-7adf1a361db3a2e9b7a27d76946482276c24fb64.tar.gz emacs-7adf1a361db3a2e9b7a27d76946482276c24fb64.tar.bz2 emacs-7adf1a361db3a2e9b7a27d76946482276c24fb64.zip |
Merge from emacs-26
3434edc731 Enlarge DUMPED_HEAP_SIZE for 64-bit Windows builds
36bbdfc017 Update Unicode data files to version 11.0.0 of Unicode
b7b7a5f4f3 * etc/NEWS: Belatedly call out vc-hg changes in v26.1. (B...
5b6f8b54d1 Clarify the documentation of 'dired-recursive-deletes'
9db97b49cd ; * etc/DEBUG: Add information about debugging libXft prob...
0214ffbe60 Clarify doc string of 'update-glyphless-char-display'
ef35d405b1 Clarify subtle issues with 'eq' in byte-compiled code
c6ef3c8321 Make cl-print respect print-quoted (bug#31649)
26b52ac40e Fix unexpected jumps of window-point in 'set-window-config...
4af077ab4d * etc/emacs.appdata.xml: Update Emacs screenshot.
e5ab25deae Fix cursor movement by 'next-logical-line' after 'next-line'
d20beef5f1 Fix prompt in bookmark.el (Bug#24726)
c57e7eaae8 Improve documentation of 'empty' whitespace-style
# Conflicts:
# etc/NEWS
Diffstat (limited to 'lisp/simple.el')
-rw-r--r-- | lisp/simple.el | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 3d625bd2886..f8c02c1dbfe 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -6002,10 +6002,6 @@ columns by which window is scrolled from left margin. When the `track-eol' feature is doing its job, the value is `most-positive-fixnum'.") -(defvar last--line-number-width 0 - "Last value of width used for displaying line numbers. -Used internally by `line-move-visual'.") - (defcustom line-move-ignore-invisible t "Non-nil means commands that move by lines ignore invisible newlines. When this option is non-nil, \\[next-line], \\[previous-line], \\[move-end-of-line], and \\[move-beginning-of-line] behave @@ -6284,19 +6280,9 @@ If NOERROR, don't signal an error if we can't move that many lines." (memq last-command `(next-line previous-line ,this-command))) ;; If so, there's no need to reset `temporary-goal-column', ;; but we may need to hscroll. - (progn - (if (or (/= (cdr temporary-goal-column) hscroll) - (> (cdr temporary-goal-column) 0)) - (setq target-hscroll (cdr temporary-goal-column))) - ;; Update the COLUMN part of temporary-goal-column if the - ;; line-number display changed its width since the last - ;; time. - (setq temporary-goal-column - (cons (+ (car temporary-goal-column) - (/ (float (- lnum-width last--line-number-width)) - (frame-char-width))) - (cdr temporary-goal-column))) - (setq last--line-number-width lnum-width)) + (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)) x-pos) @@ -6306,7 +6292,7 @@ If NOERROR, don't signal an error if we can't move that many lines." ((memq (nth 1 posn) '(right-fringe left-fringe)) (setq temporary-goal-column (cons (window-width) hscroll))) ((car (posn-x-y posn)) - (setq x-pos (car (posn-x-y posn))) + (setq x-pos (- (car (posn-x-y posn)) lnum-width)) ;; In R2L lines, the X pixel coordinate is measured from the ;; left edge of the window, but columns are still counted ;; from the logical-order beginning of the line, i.e. from |