mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-26 06:39:43 +03:00
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.
This commit is contained in:
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
Block a user