m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-13 22:03:47 -05:00

Fix {show,hide,toggle}-input and add test cases

This commit is contained in:
Junegunn Choi
2025-02-01 17:22:44 +09:00
parent 18cbb4a84d
commit 178b49832e
2 changed files with 20 additions and 2 deletions

View File

@@ -2533,7 +2533,7 @@ func (t *Terminal) printInfoImpl() {
func (t *Terminal) resizeIfNeeded() bool {
// Check if input border is used and input has changed
if t.inputBorderShape.Visible() && t.inputWindow == nil && !t.inputless {
if t.inputBorderShape.Visible() && t.inputWindow == nil && !t.inputless || t.inputWindow != nil && t.inputless {
t.printAll()
return true
}
@@ -5948,6 +5948,7 @@ func (t *Terminal) Loop() error {
// Always just discard the change
t.input = previousInput
t.cx = len(t.input)
beof = false
} else {
t.truncateQuery()
}