GNU bug report logs -
#23079
25.0.92; Movement commands leave cursor in invisible line
Previous Next
Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>
Date: Mon, 21 Mar 2016 20:20:01 UTC
Severity: normal
Tags: notabug
Found in version 25.0.92
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
tags 23079 notabug
thanks
> I try to give a recipe resembling a bug in Magit concerning hidden lines
> and cursor movement. In some buffer (emacs -Q) do
> (insert "111" "\n222\n"
> (propertize "333\n444\n\n" 'invisible t)
> "555\n666\n")
> and move around with C-n, C-p. Then the cursor will appear over the
> first "5" but point is actually located inside the invisible area.
That's normal: (get-pos-property <pos> 'invisible) returns nil in front
of "333" but t in front of "555", so point adjustment will try to move
point to right before "333" when we're in that invisible chunk.
IOW the position "right before 555" is actually considered as being
"inside the invisible area" whereas the position "right before 333" is
considered as being outside of it.
If you want point adjustment to move point to right before "555"
instead, you should change the stickiness of the `invisible' property so
as to change which boundary position is considered "inside" and which is
considered "outside".
Stefan
This bug report was last modified 4 years and 295 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.