Re: [patch] fix another End keypress lockup in the viewer

Pavel Tsekov wrote:

On Mon, 15 Aug 2005, Roland Illig wrote:

Because we are in text wrap mode. Internally the viewer stores the
"unwrapped" coordinates. When you want to go one line up, you have to
distinguish whether you are inside a long line or at the beginning of a
line. This is what the code does.

Well, maybe the cache should be changed then. And btw this was idea that I
have not investigated fully it just crossed my mind. But what is done now
is clearly suboptimal.

If the cache was changed, the code for the non-wrapping text mode would become more complicated, just as the text_wrap_mode code is now.

I decided to store the unwrapped coordinates in the cache because the user might change the screen size, which would invalidate the whole cache if it contained the wrapped coordinates. The unwrapped coordinates also make displaying the current position very easy.


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