[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fw: request for bug fix of "invisible"
From: |
Stefan Monnier |
Subject: |
Re: Fw: request for bug fix of "invisible" |
Date: |
Thu, 18 Nov 2004 11:20:17 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
>>>> Would someone kindly respond this report?
>>>> Thanks in advance.
>>
>>> Below is a patch which fixes the C-n C-p movement.
>>
>>> The C-e on "line 3" still works strange because if you place cursor on
>>> the 'l', C-x = reports point=8 which is actually the hidden 'l' on
>>> line 2, rather than the visible 'l' on line 3 (point=15).
>>
>>> Stefan, can you comment on this?
>>
>> Since by default the `invisible' text-property is rear-sticky and
>> front-non-sticky, if you insert a char before the "l" of "line3" it will be
>> invisible, whereas if you insert a char in front of the "l" of "line2" it
>> will not be invisible. For this reason, the cursor-movement code tries to
>> place point in front of "line2" rather than in front of "line3".
> So if I have this:
> line 1
> line 2
> line 3
> and make line 2 invisible, I get:
> line 1
> line 3
> I place the cursor on the l on line 3, and type x, I get:
> line 1
> xline 3
> Now, if I make line 2 visible again, I end up with
> line 1
> xline 2
> line 3
> That's hardly what a "normal" user would expect (I consider myself
> normal in this case :-)
So you'd probably prefer it if invisible was made front-sticky and
rear-non-sticky. I personally have no opinion on this.
>> C-e should not presume anything about the visibility of surrounding text.
> So if we have
> line 1
> line 3
> from above, place the cursor on l on line 3, and hit C-e, the
> cursor is moved to the i on line 3.
> Do you say that you think that behaviour is correct ?
Obviously not. What I'm saying is that the position of point is not the bug
but merely the cause that triggers a bug in C-e. In other words, C-e needs
to be fixed not to presume anything about the visibility of the
surrounding text.
Stefan