fix(rprompt): print when plain

This commit is contained in:
Jan De Dobbeleer 2023-08-06 15:42:07 +02:00 committed by Jan De Dobbeleer
parent 4bab59fbd8
commit 9a6fbb6f52

View file

@ -36,7 +36,7 @@ func (e *Engine) string() string {
} }
func (e *Engine) canWriteRightBlock(rprompt bool) (int, bool) { func (e *Engine) canWriteRightBlock(rprompt bool) (int, bool) {
if rprompt && (len(e.rprompt) == 0 || e.Plain) { if rprompt && (len(e.rprompt) == 0) {
return 0, false return 0, false
} }
@ -248,7 +248,7 @@ func (e *Engine) renderBlock(block *Block, cancelNewline bool) {
space -= length space -= length
if space > 0 { if space > 0 {
prompt += strings.Repeat(" ", space-length) prompt += strings.Repeat(" ", space)
} }
prompt += text prompt += text