diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2023-05-17 10:55:12 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-05-17 10:58:03 +0900 |
commit | 607eacf8c73f60d778c4a0bf303f1593704b17c3 (patch) | |
tree | 837d733056a0cff86dcd1041906e798948ee6b8d /src/terminal.go | |
parent | 7a049644a825d802218fd287ad0d31bb178ba643 (diff) |
Allow unbind(focus)
Fix #3279
Diffstat (limited to 'src/terminal.go')
-rw-r--r-- | src/terminal.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/terminal.go b/src/terminal.go index 8feb2799..f25cd2f3 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -2719,11 +2719,6 @@ func (t *Terminal) Loop() { } } - var onFocus []*action - if actions, prs := t.keymap[tui.Focus.AsEvent()]; prs { - onFocus = actions - } - go func() { var focusedIndex int32 = minItem.Index() var version int64 = -1 @@ -2764,7 +2759,7 @@ func (t *Terminal) Loop() { t.track = trackDisabled t.printInfo() } - if onFocus != nil && focusChanged { + if onFocus, prs := t.keymap[tui.Focus.AsEvent()]; prs && focusChanged { t.serverChan <- onFocus } if focusChanged || version != t.version { |