moving: determine the correct leftedge when paging up/down too
The change in commit 244a503d
for the <Up> and <Down> keys
needs to be done for <PageUp> and <PageDown> too.
master
parent
644fedcb61
commit
d01756bb69
14
src/move.c
14
src/move.c
|
@ -65,7 +65,12 @@ void do_page_up(void)
|
|||
|
||||
#ifndef NANO_TINY
|
||||
if (ISSET(SOFTWRAP)) {
|
||||
leftedge = (openfile->placewewant / editwincols) * editwincols;
|
||||
size_t realspan = strlenpt(openfile->current->data);
|
||||
|
||||
if (openfile->placewewant < realspan)
|
||||
realspan = openfile->placewewant;
|
||||
|
||||
leftedge = (realspan / editwincols) * editwincols;
|
||||
target_column = openfile->placewewant % editwincols;
|
||||
} else
|
||||
#endif
|
||||
|
@ -103,7 +108,12 @@ void do_page_down(void)
|
|||
|
||||
#ifndef NANO_TINY
|
||||
if (ISSET(SOFTWRAP)) {
|
||||
leftedge = (openfile->placewewant / editwincols) * editwincols;
|
||||
size_t realspan = strlenpt(openfile->current->data);
|
||||
|
||||
if (openfile->placewewant < realspan)
|
||||
realspan = openfile->placewewant;
|
||||
|
||||
leftedge = (realspan / editwincols) * editwincols;
|
||||
target_column = openfile->placewewant % editwincols;
|
||||
} else
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue