mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-09-29 23:54:59 +00:00
EDIT: Reduced amount of backtracking in draw_screen() to make it faster.
This commit is contained in:
parent
b2108c9e7c
commit
213780c5d1
@ -1078,10 +1078,10 @@ void draw_screen(void) {
|
|||||||
|
|
||||||
// First we have to scan back to work out where in the buffer to
|
// First we have to scan back to work out where in the buffer to
|
||||||
// start drawing on the screen at the top left. This is at most
|
// start drawing on the screen at the top left. This is at most
|
||||||
// NROWS * NCOLS chars.
|
// CURSORROW * NCOLS chars.
|
||||||
startpos = gapbegin;
|
startpos = gapbegin;
|
||||||
if (startpos > NROWS * NCOLS)
|
if (startpos > (CURSORROW + 2) * NCOLS)
|
||||||
startpos -= NROWS * NCOLS;
|
startpos -= (CURSORROW + 2) * NCOLS;
|
||||||
else
|
else
|
||||||
startpos = 0;
|
startpos = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user