From bee8d6e9e6b6800218ab5083ae2d6bffda41d209 Mon Sep 17 00:00:00 2001 From: TorchedSammy <38820196+TorchedSammy@users.noreply.github.com> Date: Mon, 18 Apr 2022 22:42:27 -0400 Subject: [PATCH] fix(readline): input going to next line if its longer than terminal width --- readline/update.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/readline/update.go b/readline/update.go index 40ff067..7c8d657 100644 --- a/readline/update.go +++ b/readline/update.go @@ -47,6 +47,10 @@ func (rl *Instance) updateReferences() { fullRest := toEndLine % GetTermWidth() rl.fullX = fullRest + if fullRest == 0 && fullOffset > 0 { + print("\n") + } + // Use rl.pos value to get the offset to go TO/FROM the CURRENT POSITION lineToCursorPos := rl.promptLen + cPosLine offsetToCursor := lineToCursorPos / GetTermWidth() @@ -116,7 +120,7 @@ func (rl *Instance) renderHelpers() { rl.getHintText() rl.writeHintText() } else if !rl.compConfirmWait { - // for the same reason above, do nothing here + // for the same reason above of wanting it below user input, do nothing here } else { rl.writeHintText() }