Patch 7.1.192

0 views
Skip to first unread message

Bram Moolenaar

unread,
Jan 3, 2008, 10:32:26 AM1/3/08
to vim...@vim.org

Patch 7.1.192
Problem: With Visual block selection, "s" and typing something, CTRL-C
doesn't stop Vim from repeating the replacement in other lines,
like happens for "I".
Solution: Check for "got_int" to be set.
Files: src/ops.c


*** ../vim-7.1.191/src/ops.c Sat Dec 1 21:12:23 2007
--- src/ops.c Thu Jan 3 16:26:37 2008
***************
*** 2468,2476 ****

edit(NUL, FALSE, (linenr_T)count1);

! /* if user has moved off this line, we don't know what to do, so do
! * nothing */
! if (curwin->w_cursor.lnum != oap->start.lnum)
return;

if (oap->block_mode)
--- 2468,2477 ----

edit(NUL, FALSE, (linenr_T)count1);

! /* If user has moved off this line, we don't know what to do, so do
! * nothing.
! * Also don't repeat the insert when Insert mode ended with CTRL-C. */
! if (curwin->w_cursor.lnum != oap->start.lnum || got_int)
return;

if (oap->block_mode)
***************
*** 2601,2608 ****
/*
* In Visual block mode, handle copying the new text to all lines of the
* block.
*/
! if (oap->block_mode && oap->start.lnum != oap->end.lnum)
{
/* Auto-indenting may have changed the indent. If the cursor was past
* the indent, exclude that indent change from the inserted text. */
--- 2602,2610 ----
/*
* In Visual block mode, handle copying the new text to all lines of the
* block.
+ * Don't repeat the insert when Insert mode ended with CTRL-C.
*/
! if (oap->block_mode && oap->start.lnum != oap->end.lnum && !got_int)
{
/* Auto-indenting may have changed the indent. If the cursor was past
* the indent, exclude that indent change from the inserted text. */
*** ../vim-7.1.191/src/version.c Thu Jan 3 16:14:25 2008
--- src/version.c Thu Jan 3 16:30:07 2008
***************
*** 668,669 ****
--- 668,671 ----
{ /* Add new patch number below this line */
+ /**/
+ 192,
/**/

--
"A mouse can be just as dangerous as a bullet or a bomb."
(US Representative Lamar Smith, R-Texas)

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Reply all
Reply to author
Forward
0 new messages