From 130977d60200ae44ca6e27474a3127d1e8cd34b7 Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Sat, 20 Jul 2019 18:30:48 +0100 Subject: add '.' command (reset line styles) --- gramscii.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/gramscii.c b/gramscii.c index a832010..f5a3425 100644 --- a/gramscii.c +++ b/gramscii.c @@ -121,7 +121,7 @@ void status_bar(){ printf("\033[%d;1f\033[7m", HEIGHT+1); printf("%100s", " "); printf("\033[%d;1f\033[7m", HEIGHT+1); - printf(" x:%3d y:%3d -- MODE:%4s HL:%c VL:%c CN:%c SM:%c EM:%c %10s", + printf(" x:%3d y:%3d -- MODE:%4s HL:%c VL:%c CN:%c SP:%c EP:%c %10s", x, y, state_str(), line_h, line_v, corner, mark_st, mark_end, ""); if (!modified) printf(" [%s]", fname ); @@ -220,12 +220,8 @@ void check_bound(){ else if (y>=HEIGHT) y = HEIGHT -1; } -void init_screen(){ - int i; - for(i=0; i': toggle_end_mark(); break; + case '.': + reset_styles(); + break; case 'q': check_modified();/** FALLTHROUGH **/ case 'Q': -- cgit v1.2.3