From 2e64499f969d08474983d5252e564e2cc7d90510 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Sat, 28 Apr 2018 17:16:22 -0400 Subject: [PATCH] Fix possible crash in findkey Fixes #1103 --- cmd/micro/bindings.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/micro/bindings.go b/cmd/micro/bindings.go index 721226dd..d8a0ede0 100644 --- a/cmd/micro/bindings.go +++ b/cmd/micro/bindings.go @@ -338,6 +338,10 @@ modSearch: } } + if len(k) == 0 { + return Key{buttons: -1}, false + } + // Control is handled specially, since some character codes in bindingKeys // are different when Control is depressed. We should check for Control keys // first. -- 2.44.0