]> git.pld-linux.org Git - packages/vim.git/blame - 6.2.147
- use new bonobo patch (20040115)
[packages/vim.git] / 6.2.147
CommitLineData
eb0ac1ae
AG
1To: vim-dev@vim.org
2Subject: Patch 6.2.147
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=ISO-8859-1
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 6.2.147
11Problem: ":s/pat/\=col('.')" always replaces with "1".
12Solution: Set the cursor to the start of the match before substituting.
13 (Helmut Stiegler)
14Files: src/ex_cmds.c
15
16
17*** ../vim-6.2.146/src/ex_cmds.c Sat Sep 27 19:36:46 2003
18--- src/ex_cmds.c Fri Nov 7 16:12:26 2003
19***************
20*** 3896,3904 ****
21 break;
22 }
23
24! /* Move the cursor to the start of the line, to avoid that it
25! * is beyond the end of the line after the substitution. */
26! curwin->w_cursor.col = 0;
27
28 /*
29 * 3. substitute the string.
30--- 3896,3904 ----
31 break;
32 }
33
34! /* Move the cursor to the start of the match, so that we can
35! * use "\=col("."). */
36! curwin->w_cursor.col = regmatch.startpos[0].col;
37
38 /*
39 * 3. substitute the string.
40***************
41*** 3970,3975 ****
42--- 3970,3979 ----
43 sub, new_end, TRUE, p_magic, TRUE);
44 sub_nsubs++;
45 did_sub = TRUE;
46+
47+ /* Move the cursor to the start of the line, to avoid that it
48+ * is beyond the end of the line after the substitution. */
49+ curwin->w_cursor.col = 0;
50
51 /* For a multi-line match, make a copy of the last matched
52 * line and continue in that one. */
53*** ../vim-6.2.146/src/version.c Sun Nov 9 20:20:26 2003
54--- src/version.c Sun Nov 9 20:22:20 2003
55***************
56*** 639,640 ****
57--- 639,642 ----
58 { /* Add new patch number below this line */
59+ /**/
60+ 147,
61 /**/
62
63--
64I once paid $12 to peer at the box that held King Tutankhamen's little
65bandage-covered midget corpse at the De Young Museum in San Francisco. I
66remember thinking how pleased he'd be about the way things turned out in his
67afterlife.
68 (Scott Adams - The Dilbert principle)
69
70 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
71/// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
72\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
73 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
This page took 0.033961 seconds and 4 git commands to generate.