diff options
| author | Eli Zaretskii | 2016-05-28 18:33:50 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-05-28 18:33:50 +0300 |
| commit | 4ef0fc192b8a10625053dbb9376c814e68612eb6 (patch) | |
| tree | e832c88bd1ce316e97e7daf3fb56d7862ff35bea | |
| parent | 99950f7214ee7efd1c5e6a76d5db81a5abe61694 (diff) | |
| download | emacs-4ef0fc192b8a10625053dbb9376c814e68612eb6.tar.gz emacs-4ef0fc192b8a10625053dbb9376c814e68612eb6.zip | |
Fix 'next-line' and 'previous-line' during keyboard macro
* lisp/simple.el (line-move-visual): Handle the case when point
moves outside of the visible portion of the buffer while executing
a keyboard macro. (Bug#13452) (Bug#23551) (Bug#23555)
| -rw-r--r-- | lisp/simple.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index affc403dcdc..3d25ec19ab2 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -6054,7 +6054,13 @@ If NOERROR, don't signal an error if we can't move that many lines." | |||
| 6054 | (setq temporary-goal-column | 6054 | (setq temporary-goal-column |
| 6055 | (cons (/ (float x-pos) | 6055 | (cons (/ (float x-pos) |
| 6056 | (frame-char-width)) | 6056 | (frame-char-width)) |
| 6057 | hscroll)))))) | 6057 | hscroll))) |
| 6058 | (executing-kbd-macro | ||
| 6059 | ;; When we move beyond the first/last character visible in | ||
| 6060 | ;; the window, posn-at-point will return nil, so we need to | ||
| 6061 | ;; approximate the goal column as below. | ||
| 6062 | (setq temporary-goal-column | ||
| 6063 | (mod (current-column) (window-text-width))))))) | ||
| 6058 | (if target-hscroll | 6064 | (if target-hscroll |
| 6059 | (set-window-hscroll (selected-window) target-hscroll)) | 6065 | (set-window-hscroll (selected-window) target-hscroll)) |
| 6060 | ;; vertical-motion can move more than it was asked to if it moves | 6066 | ;; vertical-motion can move more than it was asked to if it moves |