Skip to content

Commit

Permalink
Fix candidate cleanup redraw issue if Enter key pressed in Complete M…
Browse files Browse the repository at this point in the history
…ode.

The completion candidates were not being cleaned up properly if the Enter
key was pressed while in complete mode. This could lead to both candidates
and any program output being mixed on the screen. Cleanly exit complete mode
and redraw when the Enter is pressed while in complete mode.
  • Loading branch information
tpodowd committed Jul 4, 2022
1 parent 5a7ad2c commit d356858
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ func (o *Operation) ioloop() {
if o.IsSearchMode() {
o.ExitSearchMode(false)
}
if o.IsInCompleteMode() {
o.ExitCompleteMode(true)
o.buf.Refresh(nil)
}
o.buf.MoveToLineEnd()
var data []rune
if !o.GetConfig().UniqueEditLine {
Expand Down

0 comments on commit d356858

Please sign in to comment.