display: make PageUp/PageDown use the correct beginning of the viewport
When typing PageUp or PageDOwn in non-smooth-scrolling mode, the cursor should be placed at the start of the top line of the edit window. This means that, when the line at edittop is partially scrolled offscreen, the cursor should be placed at openfile->firstcolumn, not at zero. This fixes https://savannah.gnu.org/bugs/?50645. Reported-by: David Lawrence Ramsey <pooka109@gmail.com>master
parent
6b1ad96f34
commit
384332d08c
|
@ -60,7 +60,8 @@ void do_page_up(void)
|
|||
* beginning of the top line of the edit window, as Pico does. */
|
||||
if (!ISSET(SMOOTH_SCROLL)) {
|
||||
openfile->current = openfile->edittop;
|
||||
openfile->placewewant = openfile->current_y = 0;
|
||||
openfile->placewewant = target_column = openfile->firstcolumn;
|
||||
openfile->current_y = 0;
|
||||
}
|
||||
|
||||
mustmove = (editwinrows < 3) ? 1 : editwinrows - 2;
|
||||
|
@ -99,7 +100,8 @@ void do_page_down(void)
|
|||
* beginning of the top line of the edit window, as Pico does. */
|
||||
if (!ISSET(SMOOTH_SCROLL)) {
|
||||
openfile->current = openfile->edittop;
|
||||
openfile->placewewant = openfile->current_y = 0;
|
||||
openfile->placewewant = target_column = openfile->firstcolumn;
|
||||
openfile->current_y = 0;
|
||||
}
|
||||
|
||||
mustmove = (editwinrows < 3) ? 1 : editwinrows - 2;
|
||||
|
|
Loading…
Reference in New Issue