mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-10 04:54:03 -08:00
fix(prompt): only pad on positive count
This commit is contained in:
parent
c4a1a55f9d
commit
744b1f042c
|
@ -244,7 +244,13 @@ func (e *Engine) renderBlock(block *Block, cancelNewline bool) {
|
|||
return
|
||||
}
|
||||
|
||||
prompt := strings.Repeat(" ", space-length)
|
||||
var prompt string
|
||||
space -= length
|
||||
|
||||
if space > 0 {
|
||||
prompt += strings.Repeat(" ", space-length)
|
||||
}
|
||||
|
||||
prompt += text
|
||||
e.write(prompt)
|
||||
case RPrompt:
|
||||
|
|
Loading…
Reference in a new issue