Skip to content

Commit

Permalink
fix(block): right align on overflow break
Browse files Browse the repository at this point in the history
resolves #5766
  • Loading branch information
JanDeDobbeleer committed Nov 25, 2024
1 parent 29a89f4 commit b871f33
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/prompt/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ func (e *Engine) canWriteRightBlock(length int, rprompt bool) (int, bool) {

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
}

Expand Down

0 comments on commit b871f33

Please sign in to comment.