Skip to content
Myr

Revert "Prefer LightRenderer on Windows if it's available"

Before adoption: this commit came in with the history the project adopted, so no landing records it.

This reverts commit 7915e365b364af4c4287e35f4697f6e3cfe33284 due to https://github.com/junegunn/fzf.vim/issues/1152#issuecomment-719696495.

authored by Junegunn Choi · committed by Junegunn Choi · parent 7915e36 · Browse files · 3 files+11 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+11 added−3 removed

  • other:+11 added−3 removed

3 files+11 added−3 removed

modified:src/tui/dummy.go+4 added
4 unmodified lines
5package tui67type Attr int89func HasFullscreenRenderer() bool {10 return false11}1213func (a Attr) Merge(b Attr) Attr {14 return a | b15}16
30 unmodified lines
modified:src/tui/tcell.go+4 added
13 unmodified lines
1415 "github.com/mattn/go-runewidth"16)1718func HasFullscreenRenderer() bool {19 return true20}2122func (p ColorPair) style() tcell.Style {23 style := tcell.StyleDefault24 return style.Foreground(tcell.Color(p.Fg())).Background(tcell.Color(p.Bg()))25}
613 unmodified lines
modified:src/terminal.go+3 added-3 removed
406 unmodified lines
407 }408 var renderer tui.Renderer409 fullscreen := opts.Height.size == 0 || opts.Height.percent && opts.Height.size == 100410 if fullscreen {411 if tui.IsLightRendererSupported() {411 if tui.HasFullscreenRenderer() {412 renderer = tui.NewFullscreenRenderer(opts.Theme, opts.Black, opts.Mouse)413 } else {414 renderer = tui.NewLightRenderer(opts.Theme, opts.Black, opts.Mouse, opts.Tabstop, opts.ClearOnExit,415 true, func(h int) int { return h })414 } else {415 renderer = tui.NewFullscreenRenderer(opts.Theme, opts.Black, opts.Mouse)416 }417 } else {418 maxHeightFunc := func(termHeight int) int {419 var maxHeight int
2167 unmodified lines