1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: When using the "n" flag with the ":s" command a \= substitution
12 will not be evaluated.
13 Solution: Do perform the evaluation, so that a function can be invoked at
14 every matching position without changing the text. (Christian
19 *** ../vim-7.3.626/src/ex_cmds.c 2012-07-10 15:18:18.000000000 +0200
20 --- src/ex_cmds.c 2012-08-08 16:44:16.000000000 +0200
24 int endcolumn = FALSE; /* cursor in last column when done */
25 pos_T old_cursor = curwin->w_cursor;
47 ! /* Skip the substitution, unless an expression is used,
48 ! * then it is evaluated in the sandbox. */
49 ! if (!(sub[0] == '\\' && sub[1] == '='))
59 * 3. substitute the string.
64 + /* prevent accidently changing the buffer by a function */
65 + save_ma = curbuf->b_p_ma;
66 + curbuf->b_p_ma = FALSE;
70 /* get length of substitution part */
71 sublen = vim_regsub_multi(®match,
72 sub_firstlnum - regmatch.startpos[0].lnum,
73 sub, sub_firstline, FALSE, p_magic, TRUE);
77 + curbuf->b_p_ma = save_ma;
83 /* When the match included the "$" of the last line it may
84 * go beyond the last line of the buffer. */
85 *** ../vim-7.3.626/src/version.c 2012-08-08 16:05:03.000000000 +0200
86 --- src/version.c 2012-08-08 16:48:45.000000000 +0200
90 { /* Add new patch number below this line */
96 hundred-and-one symptoms of being an internet addict:
97 225. You sign up for free subscriptions for all the computer magazines
99 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
100 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
101 \\\ an exciting new programming language -- http://www.Zimbu.org ///
102 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///