Viewer's cursor position and growing view (was Re: code improvements for the viewer)



Hello,

On Mon, 11 Jul 2005, Roland Illig wrote:

> Pavel Tsekov wrote:
> > Another problem that I see here (though this might be related to some
> > local changes). If growing view is used i.e. viewing .bz2, .gz2, .rpm,
> > etc, the cursor is displayed at the end of the status line until the last
> > page of text is reached.
>
> I can reproduce it here.
>
> Where would you like to have the cursor? In the lower right corner?
> (This would only affect the text mode, as in hex mode, the cursor is
> already placed at the current offset.)

This visual glitch is caused by the fact that when the viewer is
in growing view mode and data is still coming from the datasource
no percent indicator is drawn in the status bar. The percent
indicator occupies the last 4 cells of the status line. Now, if
the percent indicator is drawn the cursor is advanced beyond the
last cell of the status bar and is displayed on the next line (the
first line of text). If no percent indicator is displayed the cursor
stays where it was after the last update of the status line. It is
obvious that this is wrong.

The old viewer code used to place the cursor after the last character
of the last line displayed in the viewer area. The cursor then tracked
the movement of the data. If the user scrolled the text down the cursor
remained at the last line. If the text was scrolled up the cursor was
displayed after the last character of the first line. There are
certain problems when PgUp/PgDown is used but stille the old behaviour
is much more consistent than what we have currently.

IMO, the perfect case would be if the cursor would move inside the viewer
area when the arrow keys are used. If the cursor is at the last visible
line and it is moved down - one more line would be loaded and displayed
at the last line position while the first line will be removed off the
screen. Similiarly if the cursors is at the first visible line and is
moved up. Home/End should move the cursor to the beginning/end of the
current line. Ctrl+Home/Ctrl+End should move to the first/last line of
text.



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