From 86f47fbf9ee68aecbd16a3cae1a98bf0a168850c Mon Sep 17 00:00:00 2001 From: Thomas O'Dowd Date: Mon, 4 Jul 2022 09:52:19 +0900 Subject: [PATCH] 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. --- operation.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/operation.go b/operation.go index 546db82..aafe5f5 100644 --- a/operation.go +++ b/operation.go @@ -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 {