mirror of
https://github.com/antonmedv/fx
synced 2024-11-15 12:13:06 +00:00
append newline to autocomplete input if it's missing
This commit is contained in:
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…
Reference in New Issue
Block a user