172,7 → 172,7 |
|
|
static void ui_refresh(const struct file *db, unsigned char screenw, unsigned char screenh, unsigned char uidirtyfrom, unsigned char uidirtyto) { |
unsigned char len; |
unsigned char x; |
const struct line far *l; |
unsigned char y = db->cursorposy; |
|
192,13 → 192,20 |
if (y < uidirtyfrom) continue; |
if (y > uidirtyto) break; |
|
x = 0; |
if (db->xoffset < l->len) { |
for (len = 0; l->payload[len] != 0; len++) mdr_cout_char(y, len, l->payload[len], scheme[COL_TXT]); |
unsigned char i, limit; |
if (l->len - db->xoffset < screenw) { |
limit = l->len; |
} else { |
len = 0; |
limit = db->xoffset + screenw - 1; |
} |
while (len < screenw - 1) mdr_cout_char(y, len++, ' ', scheme[COL_TXT]); |
for (i = db->xoffset; i < limit; i++) mdr_cout_char(y, x++, l->payload[i], scheme[COL_TXT]); |
} |
|
/* write empty spaces until end of line */ |
if (x < screenw - 1) mdr_cout_char_rep(y, x, ' ', scheme[COL_TXT], screenw - 1 - x); |
|
#ifdef DBG_REFRESH |
mdr_cout_char(y, 0, m, scheme[COL_STATUSBAR1]); |
#endif |
206,7 → 213,10 |
if (y == screenh - 2) break; |
} |
|
while (y < screenh - 1) { |
mdr_cout_char_rep(y++, 0, ' ', scheme[COL_TXT], screenw - 1); |
} |
} |
|
|
static void check_cursor_not_after_eol(struct file *db, unsigned char *uidirtyfrom, unsigned char *uidirtyto) { |