From 20bb5e18fe8c0e215514448a5e82c93964d85cf9 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Wed, 17 May 2006 23:39:39 +0200 Subject: [PATCH] Redraw the whole display after toggling line number --- tig.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tig.c b/tig.c index a4aaa0e..a0f7911 100644 --- a/tig.c +++ b/tig.c @@ -798,6 +798,19 @@ update_view_title(struct view *view) wrefresh(view->title); } +static void +redraw_display(void) +{ + struct view *view; + int i; + + foreach_view (view, i) { + redraw_view(view); + update_view_title(view); + } +} + + /* * Navigation */ @@ -1310,8 +1323,7 @@ view_driver(struct view *view, enum request request) } case REQ_TOGGLE_LINE_NUMBERS: opt_line_number = !opt_line_number; - redraw_view(view); - update_view_title(view); + redraw_display(); break; case REQ_PROMPT: @@ -1335,10 +1347,7 @@ view_driver(struct view *view, enum request request) resize_display(); /* Fall-through */ case REQ_SCREEN_REDRAW: - foreach_view (view, i) { - redraw_view(view); - update_view_title(view); - } + redraw_display(); break; case REQ_SCREEN_UPDATE: -- 2.30.2