summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1146
blob: 57c20b0be6727c2a2b7287f3549f9cc439c2f539 (plain)
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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1146
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.1146
Problem:    In MS-Windows console colors in a terminal window are wrong.
Solution:   Use the ansi index also for 16 colors. (Ken Takata)
Files:	    src/terminal.c


*** ../vim-8.1.1145/src/terminal.c	2019-04-06 22:01:20.756989404 +0200
--- src/terminal.c	2019-04-11 11:23:46.712315123 +0200
***************
*** 2433,2440 ****
      if (color->ansi_index != VTERM_ANSI_INDEX_NONE)
      {
  	/* First 16 colors and default: use the ANSI index, because these
! 	 * colors can be redefined. */
! 	if (t_colors >= 16)
  	    return color->ansi_index;
  	switch (color->ansi_index)
  	{
--- 2433,2440 ----
      if (color->ansi_index != VTERM_ANSI_INDEX_NONE)
      {
  	/* First 16 colors and default: use the ANSI index, because these
! 	 * colors can be redefined, we use the RGB values. */
! 	if (t_colors > 256)
  	    return color->ansi_index;
  	switch (color->ansi_index)
  	{
***************
*** 3604,3609 ****
--- 3604,3610 ----
      for (; index < 16; index++)
      {
  	VTermColor	color;
+ 
  	color.red = (unsigned)(rgb[index] >> 16);
  	color.green = (unsigned)(rgb[index] >> 8) & 255;
  	color.blue = (unsigned)rgb[index] & 255;
*** ../vim-8.1.1145/src/version.c	2019-04-11 11:19:21.553778627 +0200
--- src/version.c	2019-04-11 11:39:27.027580424 +0200
***************
*** 773,774 ****
--- 773,776 ----
  {   /* Add new patch number below this line */
+ /**/
+     1146,
  /**/

-- 
"Women marry men hoping they will change. Men marry women hoping
they will not. So each is inevitably disappointed."
 - Einstein

 /// 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    ///