diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-07 22:04:49 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-10 00:23:01 +1100 |
commit | 777ec0b36c5e7b7ba67766ec1bef3ebb3d60f599 (patch) | |
tree | 013fd27d29ad850e314dfaf9e2b8b5da5fbc54f0 /vendor | |
parent | 795e4da8b8fa08eb2e55cd7587ddba077402e9ad (diff) |
fix nil view keybinding panic
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/github.com/jesseduffield/gocui/gui.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/github.com/jesseduffield/gocui/gui.go b/vendor/github.com/jesseduffield/gocui/gui.go index a90cce202..8785dd94b 100644 --- a/vendor/github.com/jesseduffield/gocui/gui.go +++ b/vendor/github.com/jesseduffield/gocui/gui.go @@ -942,7 +942,7 @@ func (g *Gui) execKeybindings(v *View, ev *termbox.Event) (matched bool, err err if kb.matchView(v) { return g.execKeybinding(v, kb) } - if kb.matchView(v.ParentView) { + if v != nil && kb.matchView(v.ParentView) { matchingParentViewKb = kb } if globalKb == nil && kb.viewName == "" && ((v != nil && !v.Editable) || (kb.ch == 0 && kb.key != KeyCtrlU && kb.key != KeyCtrlA && kb.key != KeyCtrlE)) { |