fix(pwsh): remove hack that solves a pwsh bug

relates to #65
This commit is contained in:
Jan De Dobbeleer 2023-08-06 20:49:46 +02:00 committed by Jan De Dobbeleer
parent f9f309d1f4
commit 0afa0880a9

View file

@ -159,15 +159,6 @@ func (e *Engine) getTitleTemplateText() string {
} }
func (e *Engine) renderBlock(block *Block, cancelNewline bool) { func (e *Engine) renderBlock(block *Block, cancelNewline bool) {
defer func() {
// when in PowerShell, we need to clear the line after the prompt
// to avoid the background being printed on the next line
// when at the end of the buffer.
// See https://github.com/JanDeDobbeleer/oh-my-posh/issues/65
if e.Env.Shell() == shell.PWSH || e.Env.Shell() == shell.PWSH5 {
e.write(e.Writer.ClearAfter())
}
}()
// when in bash, for rprompt blocks we need to write plain // when in bash, for rprompt blocks we need to write plain
// and wrap in escaped mode or the prompt will not render correctly // and wrap in escaped mode or the prompt will not render correctly
if e.Env.Shell() == shell.BASH && block.Type == RPrompt { if e.Env.Shell() == shell.BASH && block.Type == RPrompt {