fix(block): right align on overflow break

resolves #5766
This commit is contained in:
Jan De Dobbeleer 2024-11-25 07:04:49 +01:00 committed by Jan De Dobbeleer
parent 29a89f4265
commit b871f33882

View file

@ -74,6 +74,11 @@ func (e *Engine) canWriteRightBlock(length int, rprompt bool) (int, bool) {
canWrite := availableSpace >= promptBreathingRoom canWrite := availableSpace >= promptBreathingRoom
// reset the available space when we can't write so we can fill the line
if !canWrite {
availableSpace = consoleWidth - length
}
return availableSpace, canWrite return availableSpace, canWrite
} }