Fix candidate cleanup redraw issue if Enter key pressed in Complete Mode.

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.
This commit is contained in:
Thomas O'Dowd 2022-07-04 09:52:19 +09:00
parent 5346085511
commit 86f47fbf9e
1 changed files with 4 additions and 0 deletions

View File

@ -270,6 +270,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 {