aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2014-09-14 15:23:08 +0200
committerMarc André Tanner <mat@brain-dump.org>2014-09-14 15:23:08 +0200
commit9ba333a6ae38820844668328e015aa3c9e6da895 (patch)
treefd7739e76b6e68da9244c7727775faaa0e2f4162 /vis.c
parent6e2c75785491ebf078db06f5a553f77552ac98a1 (diff)
downloadvis-9ba333a6ae38820844668328e015aa3c9e6da895.tar.gz
vis-9ba333a6ae38820844668328e015aa3c9e6da895.tar.xz
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.
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c6
1 files changed, 2 insertions, 4 deletions
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;