diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-11-13 22:00:50 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-11-13 22:00:50 -0800 |
commit | 485cd25739115047518f006a8f535b9c5e7dd043 (patch) | |
tree | 35c109f731cd7f93260c53c8337cd3be2302f0c2 /src/kilo.c | |
parent | a7139a6b1462458487c8a416f521ceaf94aa604f (diff) | |
download | teliva-485cd25739115047518f006a8f535b9c5e7dd043.tar.gz |
fix for editor highlighting
Bug introduced during the transition to ncurses.
Diffstat (limited to 'src/kilo.c')
-rw-r--r-- | src/kilo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kilo.c b/src/kilo.c index bd3bd60..801ba4b 100644 --- a/src/kilo.c +++ b/src/kilo.c @@ -655,8 +655,10 @@ extern void draw_menu_item(const char* key, const char* name); static void editorRefreshScreen(void) { int y; erow *r; + int current_color = -1; curs_set(0); clear(); + attrset(A_NORMAL); for (y = 0; y < LINES-1; y++) { int filerow = E.rowoff+y; @@ -667,7 +669,6 @@ static void editorRefreshScreen(void) { r = &E.row[filerow]; int len = r->rsize - E.coloff; - int current_color = -1; mvaddstr(y, 0, ""); if (len > 0) { if (len > COLS) len = COLS; |