show unknown mapping error for unbind mouse events

cc #268 #570
This commit is contained in:
Gokcehan 2021-01-29 19:47:28 +03:00
parent 13d19d84f9
commit 2aa50aecaf

7
ui.go
View File

@ -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: