forked from aniani/vim
patch 8.1.1330: using bold attribute in terminal changes the color
Problem: Using bold attribute in terminal changes the color. (Jason Franklin) Solution: Don't set the "bold-highbright" flag in vterm unless the terminal supports less than 16 colors.
This commit is contained in:
@@ -3976,7 +3976,9 @@ create_vterm(term_T *term, int rows, int cols)
|
|||||||
&term->tl_default_color.fg,
|
&term->tl_default_color.fg,
|
||||||
&term->tl_default_color.bg);
|
&term->tl_default_color.bg);
|
||||||
|
|
||||||
if (t_colors >= 16)
|
if (t_colors < 16)
|
||||||
|
// Less than 16 colors: assume that bold means using a bright color for
|
||||||
|
// the foreground color.
|
||||||
vterm_state_set_bold_highbright(vterm_obtain_state(vterm), 1);
|
vterm_state_set_bold_highbright(vterm_obtain_state(vterm), 1);
|
||||||
|
|
||||||
/* Required to initialize most things. */
|
/* Required to initialize most things. */
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
>A+0#0000001#8080809@1|B+0#e000002#ff404010@1|C+0#00e0003#40ff4011@1|D+0#e0e0004#ffff4012@1|E+0#0000e05#4040ff13@1|F+0#e000e06#ff40ff14@1|G+0#00e0e07#40ffff15@1|H+0#e0e0e08#ffffff16@1|I+0#8080809#0000001@1|J+0#ff404010#e000002@1|K+0#40ff4011#00e0003@1|L+0#ffff4012#e0e0004@1|M+0#4040ff13#0000e05@1|N+0#ff40ff14#e000e06@1|O+0#40ffff15#00e0e07@1|P+0#ffffff16#e0e0e08@1| +0#0000000#ffffff0@42
|
>A+0#0000001#8080809@1|B+0#e000002#ff404010@1|C+0#00e0003#40ff4011@1|D+0#e0e0004#ffff4012@1|E+0#0000e05#4040ff13@1|F+0#e000e06#ff40ff14@1|G+0#00e0e07#40ffff15@1|H+0#e0e0e08#ffffff16@1|I+0#8080809#0000001@1|J+0#ff404010#e000002@1|K+0#40ff4011#00e0003@1|L+0#ffff4012#e0e0004@1|M+0#4040ff13#0000e05@1|N+0#ff40ff14#e000e06@1|O+0#40ffff15#00e0e07@1|P+0#ffffff16#e0e0e08@1| +0#0000000#ffffff0|X+2#e000002&@1|Y+2#40ff4011&@1|Z+2#ff40ff14#e000e06@1| +0#0000000#ffffff0@35
|
||||||
@2| +0#4040ff13&@72
|
@2| +0#4040ff13&@72
|
||||||
|~| @73
|
|~| @73
|
||||||
|~| @73
|
|~| @73
|
||||||
|
@@ -1491,7 +1491,7 @@ func Test_terminal_all_ansi_colors()
|
|||||||
|
|
||||||
" Use all the ANSI colors.
|
" Use all the ANSI colors.
|
||||||
call writefile([
|
call writefile([
|
||||||
\ 'call setline(1, "AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPP")',
|
\ 'call setline(1, "AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPP XXYYZZ")',
|
||||||
\ 'hi Tblack ctermfg=0 ctermbg=8',
|
\ 'hi Tblack ctermfg=0 ctermbg=8',
|
||||||
\ 'hi Tdarkred ctermfg=1 ctermbg=9',
|
\ 'hi Tdarkred ctermfg=1 ctermbg=9',
|
||||||
\ 'hi Tdarkgreen ctermfg=2 ctermbg=10',
|
\ 'hi Tdarkgreen ctermfg=2 ctermbg=10',
|
||||||
@@ -1508,6 +1508,9 @@ func Test_terminal_all_ansi_colors()
|
|||||||
\ 'hi Tmagenta ctermfg=13 ctermbg=5',
|
\ 'hi Tmagenta ctermfg=13 ctermbg=5',
|
||||||
\ 'hi Tcyan ctermfg=14 ctermbg=6',
|
\ 'hi Tcyan ctermfg=14 ctermbg=6',
|
||||||
\ 'hi Twhite ctermfg=15 ctermbg=7',
|
\ 'hi Twhite ctermfg=15 ctermbg=7',
|
||||||
|
\ 'hi TdarkredBold ctermfg=1 cterm=bold',
|
||||||
|
\ 'hi TgreenBold ctermfg=10 cterm=bold',
|
||||||
|
\ 'hi TmagentaBold ctermfg=13 cterm=bold ctermbg=5',
|
||||||
\ '',
|
\ '',
|
||||||
\ 'call matchadd("Tblack", "A")',
|
\ 'call matchadd("Tblack", "A")',
|
||||||
\ 'call matchadd("Tdarkred", "B")',
|
\ 'call matchadd("Tdarkred", "B")',
|
||||||
@@ -1525,6 +1528,9 @@ func Test_terminal_all_ansi_colors()
|
|||||||
\ 'call matchadd("Tmagenta", "N")',
|
\ 'call matchadd("Tmagenta", "N")',
|
||||||
\ 'call matchadd("Tcyan", "O")',
|
\ 'call matchadd("Tcyan", "O")',
|
||||||
\ 'call matchadd("Twhite", "P")',
|
\ 'call matchadd("Twhite", "P")',
|
||||||
|
\ 'call matchadd("TdarkredBold", "X")',
|
||||||
|
\ 'call matchadd("TgreenBold", "Y")',
|
||||||
|
\ 'call matchadd("TmagentaBold", "Z")',
|
||||||
\ 'redraw',
|
\ 'redraw',
|
||||||
\ ], 'Xcolorscript')
|
\ ], 'Xcolorscript')
|
||||||
let buf = RunVimInTerminal('-S Xcolorscript', {'rows': 10})
|
let buf = RunVimInTerminal('-S Xcolorscript', {'rows': 10})
|
||||||
|
@@ -767,6 +767,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1330,
|
||||||
/**/
|
/**/
|
||||||
1329,
|
1329,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user