infopane: HandleEvent: reset key sequence when handling y/n prompt
Fix the following buggy behavior: 1. bind "<n><a>" to the Paste action in the command bar 2. open a split pane, type some text and press Ctrl-q to close it 3. answer "n" to the "Save changes before closing?" prompt 4. press Ctrl-e to open the command prompt and press "a" -> result: instead of inserting the "a" letter, clipboard is pasted.
This commit is contained in:
parent
36bf3f6619
commit
5b3737fb2a
1 changed files with 6 additions and 0 deletions
|
@ -98,9 +98,15 @@ func (h *InfoPane) HandleEvent(event tcell.Event) {
|
|||
if (e.Rune() == 'y' || e.Rune() == 'Y') && hasYN {
|
||||
h.YNResp = true
|
||||
h.DonePrompt(false)
|
||||
|
||||
InfoBindings.ResetEvents()
|
||||
InfoBufBindings.ResetEvents()
|
||||
} else if (e.Rune() == 'n' || e.Rune() == 'N') && hasYN {
|
||||
h.YNResp = false
|
||||
h.DonePrompt(false)
|
||||
|
||||
InfoBindings.ResetEvents()
|
||||
InfoBufBindings.ResetEvents()
|
||||
}
|
||||
}
|
||||
if e.Key() == tcell.KeyRune && !done && !hasYN {
|
||||
|
|
Loading…
Reference in a new issue