mirror of https://github.com/Hilbis/Hilbish
fix(readline): input going to next line if its longer than terminal width
parent
48cb62282d
commit
bee8d6e9e6
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue