From e4ad61a78b3608c7a590bf87a6298379ad23a97e Mon Sep 17 00:00:00 2001 From: absolutelightning Date: Fri, 27 Sep 2024 20:20:46 +0530 Subject: [PATCH] bug fix dropdown always open --- client/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/main.go b/client/main.go index 0198715..b3c63cb 100644 --- a/client/main.go +++ b/client/main.go @@ -77,6 +77,9 @@ func readAllData(conn net.Conn) (string, error) { func completer(d prompt.Document) []prompt.Suggest { input := d.TextBeforeCursor() firstWord := strings.Split(input, " ")[0] + if firstWord == "" { + return []prompt.Suggest{} + } s := []prompt.Suggest{ {Text: "DBSIZE", Description: "Get number of keys in the db"}, {Text: "DEL", Description: "DEL key - Delete a key"},