summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0481
blob: 682c01928c83c7859bead84d6144db9aae6837e6 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0481
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.0481
Problem:    When "Terminal" highlight is reverted cursor doesn't show.
Solution:   Get the colors of the "Terminal" group. (closes #3546)
Files:	    src/terminal.c


*** ../vim-8.1.0480/src/terminal.c	2018-09-09 19:56:03.434838223 +0200
--- src/terminal.c	2018-10-16 22:05:15.814900004 +0200
***************
*** 1953,1958 ****
--- 1953,1960 ----
  {
      term_T		 *term = in_terminal_loop;
      static cursorentry_T entry;
+     int			 id;
+     guicolor_T		term_fg, term_bg;
  
      vim_memset(&entry, 0, sizeof(entry));
      entry.shape = entry.mshape =
***************
*** 1966,1974 ****
  	entry.blinkon = 400;
  	entry.blinkoff = 250;
      }
!     *fg = gui.back_pixel;
      if (term->tl_cursor_color == NULL)
! 	*bg = gui.norm_pixel;
      else
  	*bg = color_name2handle(term->tl_cursor_color);
      entry.name = "n";
--- 1968,1991 ----
  	entry.blinkon = 400;
  	entry.blinkoff = 250;
      }
! 
!     /* The "Terminal" highlight group overrules the defaults. */
!     id = syn_name2id((char_u *)"Terminal");
!     if (id != 0)
!     {
! 	syn_id2colors(id, &term_fg, &term_bg);
! 	*fg = term_bg;
!     }
!     else
! 	*fg = gui.back_pixel;
! 
      if (term->tl_cursor_color == NULL)
!     {
! 	if (id != 0)
! 	    *bg = term_fg;
! 	else
! 	    *bg = gui.norm_pixel;
!     }
      else
  	*bg = color_name2handle(term->tl_cursor_color);
      entry.name = "n";
*** ../vim-8.1.0480/src/version.c	2018-10-16 21:13:10.411812362 +0200
--- src/version.c	2018-10-16 22:07:53.913539102 +0200
***************
*** 794,795 ****
--- 794,797 ----
  {   /* Add new patch number below this line */
+ /**/
+     481,
  /**/

-- 
Your fault: core dumped

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