From 790d295e2e09a9fa1d7d2889098397a57d6c2ebf Mon Sep 17 00:00:00 2001 From: David Haukeness Date: Sat, 26 Oct 2019 13:22:59 -0600 Subject: [PATCH] fixes issue with tab completion where commands would not clear input box titles --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 27d9f95..66b246e 100644 --- a/main.go +++ b/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