Sun terminal color fixes.

This addresses problems in the color handling found on Sun and illumos
consoles.  The infocmp for these terminals is buggy as well.
This commit is contained in:
Garrett D'Amore 2021-05-31 17:59:55 -07:00
parent c43eafe245
commit 3687c97d3d
4 changed files with 23 additions and 8 deletions

View File

@ -38,7 +38,7 @@ const (
// system or terminal default may exist. It's also the zero value.
ColorDefault Color = 0
// ColorIsValid is used to indicate the color value is actually
// ColorValid is used to indicate the color value is actually
// valid (initialized). This is useful to permit the zero value
// to be treated as the default.
ColorValid Color = 1 << 32

View File

@ -14,7 +14,6 @@ pcansi
rxvt,rxvt-256color,rxvt-88color,rxvt-unicode,rxvt-unicode-256color
screen,screen-256color
st,st-256color|simpleterm
sun,sun-color
termite
tmux
vt52

View File

@ -1,4 +1,22 @@
// Generated automatically. DO NOT HAND-EDIT.
// Copyright 2021 The TCell Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use file except in compliance with the License.
// You may obtain a copy of the license at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// This terminal definition is hand-coded, as the default terminfo for
// this terminal is busted with respect to color. Unlike pretty much every
// other ANSI compliant terminal, this terminal cannot combine foreground and
// background escapes. The default terminfo also only provides escapes for
// 16-bit color.
package sun
@ -58,9 +76,8 @@ func init() {
AttrOff: "\x1b[m",
Bold: "\x1b[1m",
Reverse: "\x1b[7m",
SetFg: "\x1b[3%p1%dm",
SetBg: "\x1b[4%p1%dm",
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
SetFg: "\x1b[38;5;%p1%dm",
SetBg: "\x1b[48;5;%p1%dm",
ResetFgBg: "\x1b[0m",
PadChar: "\x00",
SetCursor: "\x1b[%i%p1%d;%p2%dH",

View File

@ -1,5 +1,4 @@
// Copyright 2020 The TCell Authors
// Copyright 2020 The TCell Authors
// Copyright 2021 The TCell Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use file except in compliance with the License.