vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 954129af9fab3606ba21039cd3f5a84575b5c8f6
parent acb8e9e7eba06ad5c36459efb4c001bc50429a81
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Wed, 10 Sep 2014 13:54:56 +0200

Keep window focused indication while prompt is shown

Diffstat:
Mconfig.def.h | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/config.def.h b/config.def.h @@ -64,8 +64,9 @@ static Command cmds[] = { /* draw a statubar, do whatever you want with win->statuswin curses window */ static void statusbar(EditorWin *win) { size_t line, col; + bool focused = vis->win == win || vis->prompt->editor == win; window_cursor_getxy(win->win, &line, &col); - wattrset(win->statuswin, vis->win == win ? A_REVERSE|A_BOLD : A_REVERSE); + wattrset(win->statuswin, focused ? A_REVERSE|A_BOLD : A_REVERSE); mvwhline(win->statuswin, 0, 0, ' ', win->width); mvwprintw(win->statuswin, 0, 0, "%s %s", text_filename(win->text), text_modified(win->text) ? "[+]" : "");