1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0415
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 8.1.0415
Problem: Not actually using 16 colors with vtp.
Solution: Always use 256 colors when vtp is used. (Nobuhiro Takasaki,
closes #3432)
Files: src/option.c, src/term.c
*** ../vim-8.1.0414/src/option.c 2018-09-21 11:59:28.287579498 +0200
--- src/option.c 2018-09-21 12:14:29.955639702 +0200
***************
*** 7785,7792 ****
#if defined(FEAT_VTP) && defined(FEAT_TERMGUICOLORS)
if (did_swaptcap)
{
- if (t_colors < 256)
- p_tgc = 0;
set_termname((char_u *)"win32");
init_highlight(TRUE, FALSE);
}
--- 7785,7790 ----
*** ../vim-8.1.0414/src/term.c 2018-09-13 15:33:39.609712174 +0200
--- src/term.c 2018-09-21 12:14:05.095844454 +0200
***************
*** 6743,6777 ****
# define KSSIZE 20
struct ks_tbl_s
{
! int code; /* value of KS_ */
! char *vtp; /* code in vtp mode */
! char *vtp2; /* code in vtp2 mode */
! char buf[KSSIZE]; /* save buffer in non-vtp mode */
! char vbuf[KSSIZE]; /* save buffer in vtp mode */
! char v2buf[KSSIZE]; /* save buffer in vtp2 mode */
! char arr[KSSIZE]; /* real buffer */
};
static struct ks_tbl_s ks_tbl[] =
{
! {(int)KS_ME, "\033|0m", "\033|0m"}, /* normal */
! {(int)KS_MR, "\033|7m", "\033|7m"}, /* reverse */
! {(int)KS_MD, "\033|1m", "\033|1m"}, /* bold */
! {(int)KS_SO, "\033|91m", "\033|91m"}, /* standout: bright red text */
! {(int)KS_SE, "\033|39m", "\033|39m"}, /* standout end: default color */
! {(int)KS_CZH, "\033|95m", "\033|95m"}, /* italic: bright magenta text */
! {(int)KS_CZR, "\033|0m", "\033|0m"}, /* italic end */
! {(int)KS_US, "\033|4m", "\033|4m"}, /* underscore */
! {(int)KS_UE, "\033|24m", "\033|24m"}, /* underscore end */
# ifdef TERMINFO
! {(int)KS_CAB, "\033|%p1%db", "\033|%p14%dm"}, /* set background color */
! {(int)KS_CAF, "\033|%p1%df", "\033|%p13%dm"}, /* set foreground color */
# else
! {(int)KS_CAB, "\033|%db", "\033|4%dm"}, /* set background color */
! {(int)KS_CAF, "\033|%df", "\033|3%dm"}, /* set foreground color */
# endif
! {(int)KS_CCO, "16", "256"}, /* colors */
! {(int)KS_NAME} /* terminator */
};
static struct builtin_term *
--- 6743,6777 ----
# define KSSIZE 20
struct ks_tbl_s
{
! int code; // value of KS_
! char *vtp; // code in vtp mode
! char *vtp2; // code in vtp2 mode
! char buf[KSSIZE]; // save buffer in non-vtp mode
! char vbuf[KSSIZE]; // save buffer in vtp mode
! char v2buf[KSSIZE]; // save buffer in vtp2 mode
! char arr[KSSIZE]; // real buffer
};
static struct ks_tbl_s ks_tbl[] =
{
! {(int)KS_ME, "\033|0m", "\033|0m"}, // normal
! {(int)KS_MR, "\033|7m", "\033|7m"}, // reverse
! {(int)KS_MD, "\033|1m", "\033|1m"}, // bold
! {(int)KS_SO, "\033|91m", "\033|91m"}, // standout: bright red text
! {(int)KS_SE, "\033|39m", "\033|39m"}, // standout end: default color
! {(int)KS_CZH, "\033|95m", "\033|95m"}, // italic: bright magenta text
! {(int)KS_CZR, "\033|0m", "\033|0m"}, // italic end
! {(int)KS_US, "\033|4m", "\033|4m"}, // underscore
! {(int)KS_UE, "\033|24m", "\033|24m"}, // underscore end
# ifdef TERMINFO
! {(int)KS_CAB, "\033|%p1%db", "\033|%p14%dm"}, // set background color
! {(int)KS_CAF, "\033|%p1%df", "\033|%p13%dm"}, // set foreground color
# else
! {(int)KS_CAB, "\033|%db", "\033|4%dm"}, // set background color
! {(int)KS_CAF, "\033|%df", "\033|3%dm"}, // set foreground color
# endif
! {(int)KS_CCO, "256", "256"}, // colors
! {(int)KS_NAME} // terminator
};
static struct builtin_term *
*** ../vim-8.1.0414/src/version.c 2018-09-21 11:59:28.291579459 +0200
--- src/version.c 2018-09-21 12:23:58.275038358 +0200
***************
*** 796,797 ****
--- 796,799 ----
{ /* Add new patch number below this line */
+ /**/
+ 415,
/**/
--
From "know your smileys":
8<}} Glasses, big nose, beard
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|