Add close action

Close #2331
This commit is contained in:
Junegunn Choi
2021-02-02 00:08:54 +09:00
parent d110372f99
commit f55c990e86
6 changed files with 30 additions and 2 deletions

View File

@@ -221,6 +221,7 @@ const (
actClearScreen
actClearQuery
actClearSelection
actClose
actDeleteChar
actDeleteCharEOF
actEndOfLine
@@ -2334,6 +2335,12 @@ func (t *Terminal) Loop() {
}
req(reqList, reqInfo)
}
case actClose:
if t.isPreviewEnabled() {
togglePreview(false)
} else {
req(reqQuit)
}
case actToggle:
if t.multi > 0 && t.merger.Length() > 0 && toggle() {
req(reqList)