[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: |
Michael Heerdegen |
Subject: |
bug#23079: 25.0.92; Movement commands leave cursor in invisible line |
Date: |
Tue, 22 Mar 2016 17:48:24 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> The default "stickiness" of overlay boundaries is the inverse of that if
> text-properties, for some reason. So, this test above suffers from the
> bug#19200, but other than that, it seems to work correctly for me
> (i.e. it prefers putting point in front of "333" rather than in front
> of "555").
>
> And if I remove the "nil t t" args to make-overlay, then
> point-adjustment correctly tries to put point in front of "555" instead
> of putting it in front of "333".
Ok, we are coming closer...
They use the default stickiness for their overlays. Nonetheless, the
behavior is the same as with "nil t t".
_But_ their local binding of post-command-hook looks like (t
magit-section-update-highlight).
When I set it to (t) only, the issue is fixed (but the highlighting
update doesn't work anymore, of course)!
magit-section-update-highlight is
#+begin_src emacs-lisp
(defun magit-section-update-highlight ()
(let ((section (magit-current-section)))
(unless (eq section magit-section-highlighted-section)
(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)
(unless (eq magit-section-highlighted-section section)
(setq magit-section-highlighted-section
(unless (magit-section-hidden section) section))))
(setq deactivate-mark nil))))
#+end_src
This function doesn't move point, but it somehow interferes with point
adjustment in another way.
Michael
- 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 <=
- 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, 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