diff options
| -rw-r--r-- | vis-modes.c | 4 | ||||
| -rw-r--r-- | vis.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/vis-modes.c b/vis-modes.c index fa69d24..967feb9 100644 --- a/vis-modes.c +++ b/vis-modes.c @@ -26,6 +26,10 @@ void vis_mode_switch(Vis *vis, enum VisMode mode) { mode_set(vis, &vis_modes[mode]); } +enum VisMode vis_mode_get(Vis *vis) { + return vis->mode->id; +} + static bool mode_unmap(Mode *mode, const char *key) { return mode && mode->bindings && map_delete(mode->bindings, key); } @@ -153,6 +153,7 @@ enum VisMode { }; void vis_mode_switch(Vis*, enum VisMode); +enum VisMode vis_mode_get(Vis*); /* In the specified mode: map a given key to a binding (binding->key is ignored). * Fails if a prefix of `key' is already mapped and `force' is false. Otherwise * all such prefixes are unmapped. */ |
