mirror of
https://github.com/Rudi9719/kbtui.git
synced 2026-03-22 06:27:24 +00:00
fixes issue with tab completion where commands would not clear input box titles
This commit is contained in:
8
main.go
8
main.go
@ -543,6 +543,10 @@ func deleteEmpty(s []string) []string {
|
||||
func handleInput(viewName string) error {
|
||||
clearView(viewName)
|
||||
inputString, _ := getInputString(viewName)
|
||||
if newViewTitle := getViewTitle(viewName); newViewTitle != "" {
|
||||
// restore any tab completion view titles on input commit
|
||||
setViewTitle(viewName, newViewTitle)
|
||||
}
|
||||
if inputString == "" {
|
||||
return nil
|
||||
}
|
||||
@ -568,10 +572,6 @@ func handleInput(viewName string) error {
|
||||
} else {
|
||||
go sendChat(inputString)
|
||||
}
|
||||
// restore any tab completion view titles on input commit
|
||||
if newViewTitle := getViewTitle(viewName); newViewTitle != "" {
|
||||
setViewTitle(viewName, newViewTitle)
|
||||
}
|
||||
|
||||
go populateList()
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user