aboutsummaryrefslogtreecommitdiff
path: root/vis.h
diff options
context:
space:
mode:
Diffstat (limited to 'vis.h')
-rw-r--r--vis.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/vis.h b/vis.h
index b751063..ab7eade 100644
--- a/vis.h
+++ b/vis.h
@@ -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);