]> git.pld-linux.org Git - packages/vim.git/blob - 7.2.408
- up to 7.2.436
[packages/vim.git] / 7.2.408
1 To: vim-dev@vim.org
2 Subject: Patch 7.2.408
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.2.408
11 Problem:    With ":g/the/s/foo/bar/" the '[ and '] marks can be set to a line
12             that was not changed.
13 Solution:   Only set '[ and '] marks when a substitution was done.
14 Files:      src/ex_cmds.c
15
16
17 *** ../vim-7.2.407/src/ex_cmds.c        2009-07-09 20:06:30.000000000 +0200
18 --- src/ex_cmds.c       2010-03-23 17:31:17.000000000 +0100
19 ***************
20 *** 4238,4243 ****
21 --- 4238,4244 ----
22       char_u    *sub_firstline;         /* allocated copy of first sub line */
23       int               endcolumn = FALSE;      /* cursor in last column when done */
24       pos_T     old_cursor = curwin->w_cursor;
25 +     int               start_nsubs;
26   
27       cmd = eap->arg;
28       if (!global_busy)
29 ***************
30 *** 4245,4250 ****
31 --- 4246,4252 ----
32         sub_nsubs = 0;
33         sub_nlines = 0;
34       }
35 +     start_nsubs = sub_nsubs;
36   
37       if (eap->cmdidx == CMD_tilde)
38         which_pat = RE_LAST;    /* use last used regexp */
39 ***************
40 *** 5106,5112 ****
41       if (do_count)
42         curwin->w_cursor = old_cursor;
43   
44 !     if (sub_nsubs)
45       {
46         /* Set the '[ and '] marks. */
47         curbuf->b_op_start.lnum = eap->line1;
48 --- 5108,5114 ----
49       if (do_count)
50         curwin->w_cursor = old_cursor;
51   
52 !     if (sub_nsubs > start_nsubs)
53       {
54         /* Set the '[ and '] marks. */
55         curbuf->b_op_start.lnum = eap->line1;
56 *** ../vim-7.2.407/src/version.c        2010-03-23 16:27:15.000000000 +0100
57 --- src/version.c       2010-03-23 17:35:40.000000000 +0100
58 ***************
59 *** 683,684 ****
60 --- 683,686 ----
61   {   /* Add new patch number below this line */
62 + /**/
63 +     408,
64   /**/
65
66 -- 
67 Permission is granted to read this message out aloud on Kings Cross Road,
68 London, under the condition that the orator is properly dressed.
69
70  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
71 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
72 \\\        download, build and distribute -- http://www.A-A-P.org        ///
73  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.033633 seconds and 3 git commands to generate.