mirror of
https://github.com/Rudi9719/kbtui.git
synced 2026-03-22 12:07:23 +00:00
fixed condition where blank lcp would create never ending strings
This commit is contained in:
2
main.go
2
main.go
@ -294,9 +294,11 @@ func handleTab() error {
|
||||
// now call get the list of all possible cantidates that have that as a prefix
|
||||
resultSlice := generateTabCompletionSlice(s)
|
||||
lcp := longestCommonPrefix(resultSlice)
|
||||
if lcp != "" {
|
||||
remainder := stringRemainder(s, lcp)
|
||||
writeToView("Input", remainder)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user