diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-05-13 23:13:52 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-05-13 23:13:52 +0200 |
| commit | a1881512f3050e8d6719a28b55846c1f4c93acab (patch) | |
| tree | dc825eecd6bff16a2ca4b76cf48c8f0a5c0090d3 /vis.h | |
| parent | 9a9f7a96f5b02777b8c0823cffd173a72ca3e3c2 (diff) | |
| download | vis-a1881512f3050e8d6719a28b55846c1f4c93acab.tar.gz vis-a1881512f3050e8d6719a28b55846c1f4c93acab.tar.xz | |
vis: clean up key mapping implementation
Diffstat (limited to 'vis.h')
| -rw-r--r-- | vis.h | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -132,10 +132,11 @@ enum VisMode { }; void vis_mode_switch(Vis*, enum VisMode); -/* in the specified mode: map a given key to a binding (binding->key is ignored), - * fails if key is already mapped */ -bool vis_mode_map(Vis*, enum VisMode, const char *key, const KeyBinding*); -bool vis_window_mode_map(Win*, enum VisMode, const char *key, const KeyBinding*); +/* 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. */ +bool vis_mode_map(Vis*, enum VisMode, bool force, const char *key, const KeyBinding*); +bool vis_window_mode_map(Win*, enum VisMode, bool force, const char *key, const KeyBinding*); /* in the specified mode: unmap a given key, fails if the key is not currently mapped */ bool vis_mode_unmap(Vis*, enum VisMode, const char *key); bool vis_window_mode_unmap(Win*, enum VisMode, const char *key); |
