From 2aa50aecafa501d5f996644b4f43fc424b7f3405 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Fri, 29 Jan 2021 19:47:28 +0300 Subject: [PATCH] show unknown mapping error for unbind mouse events cc #268 #570 --- ui.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui.go b/ui.go index c59698d..4c6b37f 100644 --- a/ui.go +++ b/ui.go @@ -1051,11 +1051,12 @@ func (ui *ui) readNormalEvent(ev tcell.Event) expr { } expr, ok := gOpts.keys[button] - if ok { - return expr + if !ok { + ui.echoerrf("unknown mapping: %s", button) + return draw } - return nil + return expr case *tcell.EventResize: return &callExpr{"redraw", nil, 1} case *tcell.EventError: