mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
bugfix for something that got stuck in 1.3
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@14 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
7a1da8791d
commit
e8c6fd0856
9
winio.c
9
winio.c
@ -528,10 +528,10 @@ inline int get_page_from_virtual(int virtual) {
|
||||
int page = 2;
|
||||
|
||||
if(virtual <= COLS - 2) return 1;
|
||||
virtual -= (COLS - 1);
|
||||
virtual -= (COLS - 2);
|
||||
|
||||
while (virtual > COLS - 2 - 7) {
|
||||
virtual -= (COLS - 1 - 7);
|
||||
virtual -= (COLS - 2 - 7);
|
||||
page++;
|
||||
}
|
||||
|
||||
@ -539,7 +539,10 @@ inline int get_page_from_virtual(int virtual) {
|
||||
}
|
||||
|
||||
inline int get_page_start_virtual(int page) {
|
||||
return --page * (COLS - 7);
|
||||
int virtual;
|
||||
virtual = --page * (COLS - 7);
|
||||
if(page) virtual -= 2 * page - 1;
|
||||
return virtual;
|
||||
}
|
||||
|
||||
inline int get_page_end_virtual(int page) {
|
||||
|
Loading…
Reference in New Issue
Block a user