diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-01-02 23:44:47 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-01-02 23:44:47 +0900 |
| commit | 543d41f3dd5b208dd10f75fd8c6e7086f40bfacc (patch) | |
| tree | 2f22dc869d0a0726df41b8ae7bd065ca2771cd01 /src | |
| parent | e5cfc988ec1d6df7f4077b02fd4622519fea32a7 (diff) | |
| download | fzf-543d41f3dd5b208dd10f75fd8c6e7086f40bfacc.tar.gz | |
Do not try to print anything is screen height is zero
Diffstat (limited to 'src')
| -rw-r--r-- | src/terminal.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/terminal.go b/src/terminal.go index 9489e4c5..b05c38b0 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -1918,6 +1918,10 @@ func (t *Terminal) printLabel(window tui.Window, render labelPrinter, opts label return } + if window.Height() == 0 { + return + } + switch borderShape { case tui.BorderHorizontal, tui.BorderTop, tui.BorderBottom, tui.BorderRounded, tui.BorderSharp, tui.BorderBold, tui.BorderBlock, tui.BorderThinBlock, tui.BorderDouble: if redrawBorder { @@ -2055,7 +2059,7 @@ func (t *Terminal) printInfo() { } func (t *Terminal) printInfoImpl() { - if t.window.Width() <= 1 { + if t.window.Width() <= 1 || t.window.Height() == 0 { return } pos := 0 |
