Skip to content

Commit

Permalink
append newline to autocomplete input if it's missing
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinJWendt committed Apr 8, 2024
1 parent 21f5833 commit a89641b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/complete/complete.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a89641b

Please sign in to comment.