]> git.pld-linux.org Git - packages/vim.git/blame - 7.2.408
- new
[packages/vim.git] / 7.2.408
CommitLineData
d1b4bd6a
ER
1To: vim-dev@vim.org
2Subject: Patch 7.2.408
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.2.408
11Problem: With ":g/the/s/foo/bar/" the '[ and '] marks can be set to a line
12 that was not changed.
13Solution: Only set '[ and '] marks when a substitution was done.
14Files: 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--
67Permission is granted to read this message out aloud on Kings Cross Road,
68London, 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.028688 seconds and 4 git commands to generate.