From 9cbe218f271ac97c5562b610fc2e2ebbd947fc3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 17 May 2018 21:50:18 +0200 Subject: vis: display count/input queue content in status bar Fix #695 --- vis-lua.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'vis-lua.c') diff --git a/vis-lua.c b/vis-lua.c index 0031421..e1c39ca 100644 --- a/vis-lua.c +++ b/vis-lua.c @@ -79,6 +79,13 @@ static void window_status_update(Vis *vis, Win *win) { vis_macro_recording(vis) ? " @": ""); left_count++; + int count = vis_count_get(vis); + const char *keys = buffer_content0(&vis->input_queue); + if (keys && keys[0]) + snprintf(right_parts[right_count++], sizeof(right_parts[0]), "%s", keys); + else if (count != VIS_COUNT_UNKNOWN) + snprintf(right_parts[right_count++], sizeof(right_parts[0]), "%d", count); + int sel_count = view_selections_count(view); if (sel_count > 1) { Selection *s = view_selections_primary_get(view); -- cgit v1.2.3