diff options
| author | Andreas Politz | 2016-08-18 10:27:05 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2016-08-18 10:27:05 +0200 |
| commit | 413cd292f6f0b63e62e6a84b3f866f2d482a582a (patch) | |
| tree | 7121d8cc71ad6daa5f872a14cdf46f5225619d25 | |
| parent | 0434f7609a0239206394280dc3e06854661be949 (diff) | |
| download | emacs-413cd292f6f0b63e62e6a84b3f866f2d482a582a.tar.gz emacs-413cd292f6f0b63e62e6a84b3f866f2d482a582a.zip | |
Don't let window start override window point in `window-state-put' (Bug#24240)
* lisp/window.el (window--state-put-2): Set 'noforce argument
when restoring a window's start position. This avoids that the
effect of `set-window-point' gets overidden by that of
`set-window-start' (Bug#24240).
| -rw-r--r-- | lisp/window.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/window.el b/lisp/window.el index 11d7a4e90d4..4699e2c5e56 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -5497,7 +5497,9 @@ value can be also stored on disk and read back in a new session." | |||
| 5497 | ;; Install positions (maybe we should do this after all | 5497 | ;; Install positions (maybe we should do this after all |
| 5498 | ;; windows have been created and sized). | 5498 | ;; windows have been created and sized). |
| 5499 | (ignore-errors | 5499 | (ignore-errors |
| 5500 | (set-window-start window (cdr (assq 'start state))) | 5500 | ;; Set 'noforce argument to avoid that window start |
| 5501 | ;; overrides window point set below (Bug#24240). | ||
| 5502 | (set-window-start window (cdr (assq 'start state)) 'noforce) | ||
| 5501 | (set-window-point window (cdr (assq 'point state)))) | 5503 | (set-window-point window (cdr (assq 'point state)))) |
| 5502 | ;; Select window if it's the selected one. | 5504 | ;; Select window if it's the selected one. |
| 5503 | (when (cdr (assq 'selected state)) | 5505 | (when (cdr (assq 'selected state)) |