summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0280
blob: 0203c3b8f9cd2b93f6b9c24b8320a16c0b92b3f9 (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0280
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.0280
Problem:    'incsearch' highlighting does not work for ":g!/".
Solution:   Skip the exclamation mark. (Hirohito Higashi)
Files:	    src/ex_getln.c, src/testdir/test_search.vim


*** ../vim-8.1.0279/src/ex_getln.c	2018-08-12 22:02:55.494056691 +0200
--- src/ex_getln.c	2018-08-13 22:53:06.873250045 +0200
***************
*** 298,303 ****
--- 298,310 ----
  			    || STRNCMP(cmd, "global", p - cmd) == 0
  			    || STRNCMP(cmd, "vglobal", p - cmd) == 0))
  		{
+ 		    // Check for "global!/".
+ 		    if (*cmd == 'g' && *p == '!')
+ 		    {
+ 			p++;
+ 			if (*skipwhite(p) == NUL)
+ 			    return FALSE;
+ 		    }
  		    p = skipwhite(p);
  		    delim = *p++;
  		    end = skip_regexp(p, delim, p_magic, NULL);
*** ../vim-8.1.0279/src/testdir/test_search.vim	2018-08-12 22:02:55.494056691 +0200
--- src/testdir/test_search.vim	2018-08-13 22:50:49.374202563 +0200
***************
*** 399,404 ****
--- 399,412 ----
    undo
    call feedkeys(":global/the\<c-l>/d\<cr>", 'tx')
    call assert_equal('  3 the theother', getline(2))
+   undo
+   call feedkeys(":g!/the\<c-l>/d\<cr>", 'tx')
+   call assert_equal(1, line('$'))
+   call assert_equal('  2 the~e', getline(1))
+   undo
+   call feedkeys(":global!/the\<c-l>/d\<cr>", 'tx')
+   call assert_equal(1, line('$'))
+   call assert_equal('  2 the~e', getline(1))
  
    call Incsearch_cleanup()
  endfunc
*** ../vim-8.1.0279/src/version.c	2018-08-12 22:02:55.494056691 +0200
--- src/version.c	2018-08-13 22:51:49.437786199 +0200
***************
*** 796,797 ****
--- 796,799 ----
  {   /* Add new patch number below this line */
+ /**/
+     280,
  /**/

-- 
A parent can be arrested if his child cannot hold back a burp during a church
service.
		[real standing law in Nebraska, United States of America]

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