Fix #2030: warn for invalid pane type

This commit is contained in:
Zachary Yedidia 2021-02-18 19:02:23 -05:00
parent 6c694a1db4
commit 8aadf6af65

View file

@ -3,6 +3,7 @@ package action
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
@ -61,7 +62,11 @@ func InitBindings() {
case string:
BindKey(k, val, Binder["buffer"])
case map[string]interface{}:
bind := Binder[k]
bind, ok := Binder[k]
if !ok || bind == nil {
screen.TermMessage(fmt.Sprintf("%s is not a valid pane type", k))
continue
}
for e, a := range val {
s, ok := a.(string)
if !ok {