Skip to content

Commit

Permalink
Append newline to autocomplete input if it's missing (fixes #303) (#304)
Browse files Browse the repository at this point in the history
* append newline to autocomplete input if it's missing

* always append newline

* Update complete.go

---------

Co-authored-by: Anton Medvedev <[email protected]>
  • Loading branch information
MarvinJWendt and antonmedv committed Apr 9, 2024
1 parent 21f5833 commit 433854d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/complete/complete.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ func doComplete(compLine string, compWord string) {
return
}

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 433854d

Please sign in to comment.