mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 06:09:38 +03:00
tweaks: only compensate for a partially-offscreen line in softwrap mode
A line can only be partially offscreen when doing softwrapping.
This commit is contained in:
parent
a1fba43452
commit
ee8681d7cc
12
src/winio.c
12
src/winio.c
@ -2949,12 +2949,14 @@ void edit_scroll(scroll_dir direction, int nrows)
|
||||
go_forward_chunks(editwinrows - nrows, &line, &leftedge);
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Compensate for the earlier chunks of a softwrapped line. */
|
||||
nrows += chunk_for(leftedge, line);
|
||||
if (ISSET(SOFTWRAP)) {
|
||||
/* Compensate for the earlier chunks of a softwrapped line. */
|
||||
nrows += chunk_for(leftedge, line);
|
||||
|
||||
/* Don't compensate for the chunks that are offscreen. */
|
||||
if (line == openfile->edittop)
|
||||
nrows -= chunk_for(openfile->firstcolumn, line);
|
||||
/* Don't compensate for the chunks that are offscreen. */
|
||||
if (line == openfile->edittop)
|
||||
nrows -= chunk_for(openfile->firstcolumn, line);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Draw new content on the blank rows inside the scrolled region
|
||||
|
Loading…
Reference in New Issue
Block a user