File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 "regexp"
77 "strings"
88
9- "github.com/mattn/go-runewidth"
10- "github.com/nsf/termbox-go"
9+ runewidth "github.com/mattn/go-runewidth"
10+ termbox "github.com/nsf/termbox-go"
1111 "github.com/nwidger/jsoncolor"
1212)
1313
@@ -55,6 +55,7 @@ func (t *Terminal) Draw(attr *TerminalDrawAttributes) error {
5555 termbox .Clear (termbox .ColorDefault , termbox .ColorDefault )
5656
5757 y := t .defaultY
58+ _ , h := termbox .Size ()
5859
5960 t .drawFilterLine (query , complete )
6061
@@ -68,9 +69,13 @@ func (t *Terminal) Draw(attr *TerminalDrawAttributes) error {
6869 }
6970
7071 for idx , cells := range cellsArr {
71- if i := idx - contentOffsetY ; i >= 0 {
72+ i := idx - contentOffsetY
73+ if i >= 0 {
7274 t .drawCells (0 , i + y , cells )
7375 }
76+ if i > h {
77+ break
78+ }
7479 }
7580
7681 termbox .SetCursor (len (t .prompt )+ attr .CursorOffset , 0 )
You can’t perform that action at this time.
0 commit comments