|
Karsten Hopp |
aca858 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
aca858 |
Subject: Patch 7.2.408
|
|
Karsten Hopp |
aca858 |
Fcc: outbox
|
|
Karsten Hopp |
aca858 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
aca858 |
Mime-Version: 1.0
|
|
Karsten Hopp |
aca858 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
aca858 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
aca858 |
------------
|
|
Karsten Hopp |
aca858 |
|
|
Karsten Hopp |
aca858 |
Patch 7.2.408
|
|
Karsten Hopp |
aca858 |
Problem: With ":g/the/s/foo/bar/" the '[ and '] marks can be set to a line
|
|
Karsten Hopp |
aca858 |
that was not changed.
|
|
Karsten Hopp |
aca858 |
Solution: Only set '[ and '] marks when a substitution was done.
|
|
Karsten Hopp |
aca858 |
Files: src/ex_cmds.c
|
|
Karsten Hopp |
aca858 |
|
|
Karsten Hopp |
aca858 |
|
|
Karsten Hopp |
aca858 |
*** ../vim-7.2.407/src/ex_cmds.c 2009-07-09 20:06:30.000000000 +0200
|
|
Karsten Hopp |
aca858 |
--- src/ex_cmds.c 2010-03-23 17:31:17.000000000 +0100
|
|
Karsten Hopp |
aca858 |
***************
|
|
Karsten Hopp |
aca858 |
*** 4238,4243 ****
|
|
Karsten Hopp |
aca858 |
--- 4238,4244 ----
|
|
Karsten Hopp |
aca858 |
char_u *sub_firstline; /* allocated copy of first sub line */
|
|
Karsten Hopp |
aca858 |
int endcolumn = FALSE; /* cursor in last column when done */
|
|
Karsten Hopp |
aca858 |
pos_T old_cursor = curwin->w_cursor;
|
|
Karsten Hopp |
aca858 |
+ int start_nsubs;
|
|
Karsten Hopp |
aca858 |
|
|
Karsten Hopp |
aca858 |
cmd = eap->arg;
|
|
Karsten Hopp |
aca858 |
if (!global_busy)
|
|
Karsten Hopp |
aca858 |
***************
|
|
Karsten Hopp |
aca858 |
*** 4245,4250 ****
|
|
Karsten Hopp |
aca858 |
--- 4246,4252 ----
|
|
Karsten Hopp |
aca858 |
sub_nsubs = 0;
|
|
Karsten Hopp |
aca858 |
sub_nlines = 0;
|
|
Karsten Hopp |
aca858 |
}
|
|
Karsten Hopp |
aca858 |
+ start_nsubs = sub_nsubs;
|
|
Karsten Hopp |
aca858 |
|
|
Karsten Hopp |
aca858 |
if (eap->cmdidx == CMD_tilde)
|
|
Karsten Hopp |
aca858 |
which_pat = RE_LAST; /* use last used regexp */
|
|
Karsten Hopp |
aca858 |
***************
|
|
Karsten Hopp |
aca858 |
*** 5106,5112 ****
|
|
Karsten Hopp |
aca858 |
if (do_count)
|
|
Karsten Hopp |
aca858 |
curwin->w_cursor = old_cursor;
|
|
Karsten Hopp |
aca858 |
|
|
Karsten Hopp |
aca858 |
! if (sub_nsubs)
|
|
Karsten Hopp |
aca858 |
{
|
|
Karsten Hopp |
aca858 |
/* Set the '[ and '] marks. */
|
|
Karsten Hopp |
aca858 |
curbuf->b_op_start.lnum = eap->line1;
|
|
Karsten Hopp |
aca858 |
--- 5108,5114 ----
|
|
Karsten Hopp |
aca858 |
if (do_count)
|
|
Karsten Hopp |
aca858 |
curwin->w_cursor = old_cursor;
|
|
Karsten Hopp |
aca858 |
|
|
Karsten Hopp |
aca858 |
! if (sub_nsubs > start_nsubs)
|
|
Karsten Hopp |
aca858 |
{
|
|
Karsten Hopp |
aca858 |
/* Set the '[ and '] marks. */
|
|
Karsten Hopp |
aca858 |
curbuf->b_op_start.lnum = eap->line1;
|
|
Karsten Hopp |
aca858 |
*** ../vim-7.2.407/src/version.c 2010-03-23 16:27:15.000000000 +0100
|
|
Karsten Hopp |
aca858 |
--- src/version.c 2010-03-23 17:35:40.000000000 +0100
|
|
Karsten Hopp |
aca858 |
***************
|
|
Karsten Hopp |
aca858 |
*** 683,684 ****
|
|
Karsten Hopp |
aca858 |
--- 683,686 ----
|
|
Karsten Hopp |
aca858 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
aca858 |
+ /**/
|
|
Karsten Hopp |
aca858 |
+ 408,
|
|
Karsten Hopp |
aca858 |
/**/
|
|
Karsten Hopp |
aca858 |
|
|
Karsten Hopp |
aca858 |
--
|
|
Karsten Hopp |
aca858 |
Permission is granted to read this message out aloud on Kings Cross Road,
|
|
Karsten Hopp |
aca858 |
London, under the condition that the orator is properly dressed.
|
|
Karsten Hopp |
aca858 |
|
|
Karsten Hopp |
aca858 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
aca858 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
aca858 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
aca858 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|