[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#3003: 23.0.92; Point trapped in overlay
From: |
Chong Yidong |
Subject: |
bug#3003: 23.0.92; Point trapped in overlay |
Date: |
Wed, 15 Apr 2009 19:29:11 -0400 |
Stefan, this is due to your change. Here is an easier recipe to
reproduce the bug:
(defun foo-test ()
(interactive)
(switch-to-buffer "* TEST *")
(erase-buffer)
(insert "asdfgh")
(put-text-property 3 5 'rear-nonsticky '(invisible))
(put-text-property 3 5 'invisible t)
(goto-char (point-min)))
Moving point forward now gets point temporarily stuck. The crucial
factor is the rear-nonsticky property.
2009-02-12 Stefan Monnier <monnier@iro.umontreal.ca>
* keyboard.c (adjust_point_for_property): Allow stopping betwen two
invisible areas.
Here is the relevant code:
/* Find boundaries `beg' and `end' of the invisible area, if any. */
while (end < ZV
/* Stop if we find a spot between two runs of
`invisible' where inserted text would be visible.
This is important when we have two invisible
boundaries that enclose an area: if the area is
empty, we need this test in order to make it
possible to place point in the middle rather than
skip both boundaries.
Note that this will stop anywhere in a non-sticky
text-property, but I don't think there's much we
can do about that. */
&& (val = get_pos_property (make_number (end),
Qinvisible, Qnil),
TEXT_PROP_MEANS_INVISIBLE (val))
Do we really need to do this test? This corner case seems unimportant,
as opposed to being able to treat non-sticky properties correctly.