append newline to autocomplete input if it's missing

pull/304/head
MarvinJWendt 2 months ago
parent 21f58332a9
commit a89641b40b

@ -139,6 +139,11 @@ func doComplete(compLine string, compWord string) {
return
}
// Append newline if it's missing. (https://github.com/antonmedv/fx/issues/303)
if input[len(input)-1] != '\n' {
input = append(input, '\n')
}
// If input is bigger than 100MB, skip completion.
if len(input) > 100*1024*1024 {
return

Loading…
Cancel
Save