aboutsummaryrefslogtreecommitdiff
path: root/vis-modes.c
diff options
context:
space:
mode:
Diffstat (limited to 'vis-modes.c')
-rw-r--r--vis-modes.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vis-modes.c b/vis-modes.c
index f519b5b..177b034 100644
--- a/vis-modes.c
+++ b/vis-modes.c
@@ -1,3 +1,4 @@
+#include <string.h>
#include "vis-core.h"
#include "util.h"
@@ -27,6 +28,8 @@ void vis_mode_switch(Vis *vis, enum VisMode mode) {
static bool mode_map(Mode *mode, const char *key, const KeyBinding *binding) {
if (!mode)
return false;
+ if (binding->alias && key[0] != '<' && strncmp(key, binding->alias, strlen(key)) == 0)
+ return false;
if (!mode->bindings) {
mode->bindings = map_new();
if (!mode->bindings)