summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1082
blob: 0201d7049fef095e106bcae231de52e89bf84fd9 (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1082
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.1082
Problem:    "Conceal" match is mixed up with 'hlsearch' match.
Solution:   Check that a match is found, not a 'hlsearch' item. (Andy
            Massimino, closes #4073)
Files:      src/screen.c


*** ../vim-8.1.1081/src/screen.c	2019-03-30 15:34:42.715472004 +0100
--- src/screen.c	2019-03-30 16:38:50.942088873 +0100
***************
*** 4133,4140 ****
  				shl->endcol = tmp_col;
  			    shl->attr_cur = shl->attr;
  #ifdef FEAT_CONCEAL
! 			    if (cur != NULL && syn_name2id((char_u *)"Conceal")
! 							       == cur->hlg_id)
  			    {
  				has_match_conc =
  					     v == (long)shl->startcol ? 2 : 1;
--- 4133,4144 ----
  				shl->endcol = tmp_col;
  			    shl->attr_cur = shl->attr;
  #ifdef FEAT_CONCEAL
! 			    // Match with the "Conceal" group results in hiding
! 			    // the match.
! 			    if (cur != NULL
! 				    && shl != &search_hl
! 				    && syn_name2id((char_u *)"Conceal")
! 								== cur->hlg_id)
  			    {
  				has_match_conc =
  					     v == (long)shl->startcol ? 2 : 1;
***************
*** 5175,5182 ****
  #ifdef FEAT_CONCEAL
  	    if (   wp->w_p_cole > 0
  		&& (wp != curwin || lnum != wp->w_cursor.lnum ||
! 							conceal_cursor_line(wp) )
! 		&& ( (syntax_flags & HL_CONCEAL) != 0 || has_match_conc > 0)
  		&& !(lnum_in_visual_area
  				    && vim_strchr(wp->w_p_cocu, 'v') == NULL))
  	    {
--- 5179,5186 ----
  #ifdef FEAT_CONCEAL
  	    if (   wp->w_p_cole > 0
  		&& (wp != curwin || lnum != wp->w_cursor.lnum ||
! 						       conceal_cursor_line(wp))
! 		&& ((syntax_flags & HL_CONCEAL) != 0 || has_match_conc > 0)
  		&& !(lnum_in_visual_area
  				    && vim_strchr(wp->w_p_cocu, 'v') == NULL))
  	    {
*** ../vim-8.1.1081/src/version.c	2019-03-30 16:24:12.240380238 +0100
--- src/version.c	2019-03-30 16:37:02.526829666 +0100
***************
*** 777,778 ****
--- 777,780 ----
  {   /* Add new patch number below this line */
+ /**/
+     1082,
  /**/

-- 
Two sheep in a meadow.  One says "baaah".  The other says "exactly!".

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