diff options
Diffstat (limited to 'src/tui/light_windows.go')
-rw-r--r-- | src/tui/light_windows.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tui/light_windows.go b/src/tui/light_windows.go index 6f876af2..aa15a8a9 100644 --- a/src/tui/light_windows.go +++ b/src/tui/light_windows.go @@ -34,6 +34,14 @@ func IsLightRendererSupported() bool { return canSetVt100 } +func (r *LightRenderer) defaultTheme() *ColorTheme { + // the getenv check is borrowed from here: https://github.com/gdamore/tcell/commit/0c473b86d82f68226a142e96cc5a34c5a29b3690#diff-b008fcd5e6934bf31bc3d33bf49f47d8R178: + if !IsLightRendererSupported() || os.Getenv("ConEmuPID") != "" || os.Getenv("TCELL_TRUECOLOR") == "disable" { + return Default16 + } + return Dark256 +} + func (r *LightRenderer) initPlatform() error { //outHandle := windows.Stdout outHandle, _ := syscall.Open("CONOUT$", syscall.O_RDWR, 0) |