mirror of
https://github.com/bobbimanners/emailler.git
synced 2025-04-23 03:37:06 +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
|
||||
// start drawing on the screen at the top left. This is at most
|
||||
// NROWS * NCOLS chars.
|
||||
// CURSORROW * NCOLS chars.
|
||||
startpos = gapbegin;
|
||||
if (startpos > NROWS * NCOLS)
|
||||
startpos -= NROWS * NCOLS;
|
||||
if (startpos > (CURSORROW + 2) * NCOLS)
|
||||
startpos -= (CURSORROW + 2) * NCOLS;
|
||||
else
|
||||
startpos = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user