Fix #2030: warn for invalid pane type
This commit is contained in:
parent
6c694a1db4
commit
8aadf6af65
1 changed files with 6 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue