mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-27 11:59:40 -08:00
fix: ignore 0 size terminals
This commit is contained in:
parent
e8062af1bb
commit
2cf288e46c
|
@ -28,7 +28,7 @@ func (e *engine) string() string {
|
||||||
func (e *engine) canWriteRPrompt() bool {
|
func (e *engine) canWriteRPrompt() bool {
|
||||||
prompt := e.string()
|
prompt := e.string()
|
||||||
consoleWidth, err := e.env.getTerminalWidth()
|
consoleWidth, err := e.env.getTerminalWidth()
|
||||||
if err != nil {
|
if err != nil || consoleWidth == 0 {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
promptWidth := e.ansi.lenWithoutANSI(prompt)
|
promptWidth := e.ansi.lenWithoutANSI(prompt)
|
||||||
|
|
Loading…
Reference in a new issue