diff --git a/src/terminal.go b/src/terminal.go index eaf6e6bd71b..778665aa801 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -408,11 +408,11 @@ func NewTerminal(opts *Options, eventBox *util.EventBox) *Terminal { var renderer tui.Renderer fullscreen := opts.Height.size == 0 || opts.Height.percent && opts.Height.size == 100 if fullscreen { - if tui.IsLightRendererSupported() { + if tui.HasFullscreenRenderer() { + renderer = tui.NewFullscreenRenderer(opts.Theme, opts.Black, opts.Mouse) + } else { renderer = tui.NewLightRenderer(opts.Theme, opts.Black, opts.Mouse, opts.Tabstop, opts.ClearOnExit, true, func(h int) int { return h }) - } else { - renderer = tui.NewFullscreenRenderer(opts.Theme, opts.Black, opts.Mouse) } } else { maxHeightFunc := func(termHeight int) int { diff --git a/src/tui/dummy.go b/src/tui/dummy.go index f78a1c27cf8..ca50e6554f3 100644 --- a/src/tui/dummy.go +++ b/src/tui/dummy.go @@ -6,6 +6,10 @@ package tui type Attr int +func HasFullscreenRenderer() bool { + return false +} + func (a Attr) Merge(b Attr) Attr { return a | b } diff --git a/src/tui/tcell.go b/src/tui/tcell.go index 3fd81323510..4f80d0697c7 100644 --- a/src/tui/tcell.go +++ b/src/tui/tcell.go @@ -15,6 +15,10 @@ import ( "github.com/mattn/go-runewidth" ) +func HasFullscreenRenderer() bool { + return true +} + func (p ColorPair) style() tcell.Style { style := tcell.StyleDefault return style.Foreground(tcell.Color(p.Fg())).Background(tcell.Color(p.Bg()))