summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-02-05 16:56:36 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-17 19:13:40 +1100
commit145c69d9ae32ec8fbdd6d1e6116efec466a0a709 (patch)
treeb5f3e33943c739a6aee6d04b9a90fb6f1f363502 /vendor
parent482bdc4f1ea5448c5e98697ae66221e544ea40dd (diff)
working again
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/jesseduffield/gocui/gui.go2
-rw-r--r--vendor/github.com/jesseduffield/gocui/view.go2
2 files changed, 3 insertions, 1 deletions
diff --git a/vendor/github.com/jesseduffield/gocui/gui.go b/vendor/github.com/jesseduffield/gocui/gui.go
index b374c82c0..1c7829b57 100644
--- a/vendor/github.com/jesseduffield/gocui/gui.go
+++ b/vendor/github.com/jesseduffield/gocui/gui.go
@@ -1441,7 +1441,7 @@ func (g *Gui) matchView(v *View, kb *keybinding) bool {
return true
}
for _, context := range kb.contexts {
- if context == g.currentContext {
+ if context == v.Context {
return true
}
}
diff --git a/vendor/github.com/jesseduffield/gocui/view.go b/vendor/github.com/jesseduffield/gocui/view.go
index 9783d7637..1316ced2e 100644
--- a/vendor/github.com/jesseduffield/gocui/view.go
+++ b/vendor/github.com/jesseduffield/gocui/view.go
@@ -149,6 +149,8 @@ type View struct {
// ParentView is the view which catches events bubbled up from the given view if there's no matching handler
ParentView *View
+ Context string // this is for assigning keybindings to a view only in certain contexts
+
searcher *searcher
// KeybindOnEdit should be set to true when you want to execute keybindings even when the view is editable