Skip to content

Commit

Permalink
fix: ignore 0 size terminals
Browse files Browse the repository at this point in the history
  • Loading branch information
JanDeDobbeleer committed May 25, 2021
1 parent e8062af commit 2cf288e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engine.go
Expand Up @@ -28,7 +28,7 @@ func (e *engine) string() string {
func (e *engine) canWriteRPrompt() bool {
prompt := e.string()
consoleWidth, err := e.env.getTerminalWidth()
if err != nil {
if err != nil || consoleWidth == 0 {
return true
}
promptWidth := e.ansi.lenWithoutANSI(prompt)
Expand Down

0 comments on commit 2cf288e

Please sign in to comment.