[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] position caches

From: Dmitry Antipov
Subject: Re: [RFC] position caches
Date: Thu, 14 Mar 2013 09:40:17 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4

On 03/12/2013 09:08 PM, Eli Zaretskii wrote:

Therefore, bidi.c needs to determine the paragraph start each time it
enters a new paragraph.  It needs to do that even if the buffer didn't
change a bit, because a new paragraph can have a different base
direction.  The bidi_it->new_paragraph flag is set when the iteration
goes out of a paragraph or when the iterator is re-seated far away of
its current position.  In those cases, xdisp.c calls
bidi_paragraph_init, which in turn calls bidi_find_paragraph_start.
You cannot return the beginning of previously found paragraph just
because the buffer didn't change.

I do not understand this. I'm trying to cache not just the previously
find paragraph start, but the previously find paragraph start against
[bidi_it->charpos, bidi_it->bytepos] buffer position; so if bidi_it is
moved in any way, cache becomes invalid even if the buffer is not changed.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]