diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2014-09-14 15:23:08 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2014-09-14 15:23:08 +0200 |
| commit | 9ba333a6ae38820844668328e015aa3c9e6da895 (patch) | |
| tree | fd7739e76b6e68da9244c7727775faaa0e2f4162 /vis.c | |
| parent | 6e2c75785491ebf078db06f5a553f77552ac98a1 (diff) | |
| download | vis-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.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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; |
