From 9ba333a6ae38820844668328e015aa3c9e6da895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sun, 14 Sep 2014 15:23:08 +0200 Subject: Display current mode in window statusbar For now just display the modes which start with '-'. I want to keep the descriptive names of the other modes available for debugging purposes. --- vis.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'vis.c') diff --git a/vis.c b/vis.c index 829b994..3a6a3a3 100644 --- a/vis.c +++ b/vis.c @@ -887,6 +887,8 @@ static void switchmode_to(Mode *new_mode) { mode_prev = mode; //fprintf(stderr, "%s -> %s\n", mode_prev->name, new_mode->name); mode = new_mode; + if (mode == config->mode || (mode->name && mode->name[0] == '-')) + statusbar(vis->win); if (mode->enter) mode->enter(mode_prev); // TODO display mode name somewhere? @@ -1070,10 +1072,6 @@ static bool exec_command(char *cmdline) { return true; } -/* default editor configuration to use */ -static Config *config = &editors[0]; - - typedef struct Screen Screen; static struct Screen { int w, h; -- cgit v1.2.3