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