[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 12:16:12 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
>> > Seems that works only for the invisible text property. In Magit,
>> > they use overlays to make text invisible, and stickiness of text
>> > properties has not effect there.
>> For overlays, you need to use the insertion-type of the beg/end marker.
>> See the FRONT-ADVANCE and REAR-ADVANCE args of make-overlay.
> Hmm, that doesn't seem to work:
> (progn
> (insert "111" "\n222\n")
> (let ((beg (point)) end)
> (insert "333\n444\n")
> (setq end (point))
> (insert "555\n666\n")
> (overlay-put
> (make-overlay beg end nil t t)
> 'invisible t)
> (goto-char 1)
> (hl-line-mode +1)))
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".
At least, in my tests,
Stefan
PS: Notice that the hl-line-highlighting is sometimes off, because it's
performed in post-command-hook, which is run *before* point-adjustment.
hl-line-mode should probably be changed to use pre-redisplay-function to
try and avoid this problem.
- 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 <=
- 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, 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