[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23079: 25.0.92; Movement commands leave cursor in invisible line
From: |
Stefan Monnier |
Subject: |
bug#23079: 25.0.92; Movement commands leave cursor in invisible line |
Date: |
Tue, 22 Mar 2016 21:59:38 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
> (let ((inhibit-read-only t)
> (deactivate-mark nil)
> (selection (magit-region-sections)))
> (mapc #'delete-overlay magit-section-highlight-overlays)
> (setq magit-section-unhighlight-sections
> magit-section-highlighted-sections
> magit-section-highlighted-sections nil)
> (unless (eq section magit-root-section)
> (run-hook-with-args-until-success
> 'magit-section-highlight-hook section selection))
> (--each magit-section-unhighlight-sections
> (run-hook-with-args-until-success
> 'magit-section-unhighlight-hook it selection))
> (restore-buffer-modified-p nil)
Hmm... what kind of buffer modifications might happen in here?
I think this might be the problem: point-adjustment is only applied after
"movement commands" and is disabled if the buffer was modified during
the course of the command (including post-command-hook).
[ This is mostly due to the simplistic way we keep track of the
"previous state", which we can't trust if the buffer was modified. ]
> This function doesn't move point, but it somehow interferes with point
> adjustment in another way.
It's difficult to adjust point without risking adverse effects in corner
cases (typically problems like "repeated C-n gets stuck" or "forward-foo
moves backward"), so point-adjustment is conservative to try and make
sure it's only done when we're sure it's "safe".
Stefan
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Michael Heerdegen, 2016/03/21
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Michael Heerdegen, 2016/03/21
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Stefan Monnier, 2016/03/21
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Michael Heerdegen, 2016/03/21
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Stefan Monnier, 2016/03/21
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Michael Heerdegen, 2016/03/22
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Stefan Monnier, 2016/03/22
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Michael Heerdegen, 2016/03/22
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line,
Stefan Monnier <=
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Eli Zaretskii, 2016/03/22
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Stefan Monnier, 2016/03/23
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Michael Heerdegen, 2016/03/23
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Michael Heerdegen, 2016/03/23
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Michael Heerdegen, 2016/03/24
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Stefan Monnier, 2016/03/24
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Jonas Bernoulli, 2016/03/25
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Eli Zaretskii, 2016/03/25
- bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Jonas Bernoulli, 2016/03/26
bug#23079: 25.0.92; Movement commands leave cursor in invisible line, Michael Heerdegen, 2016/03/21