Mercurial > vim
changeset 1477:2951f28a9bd3 v7.1.192
updated for version 7.1-192
author | vimboss |
---|---|
date | Thu, 03 Jan 2008 15:34:40 +0000 |
parents | ea1a2950ed16 |
children | fa07532e69c6 |
files | src/ops.c src/version.c |
diffstat | 2 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ops.c +++ b/src/ops.c @@ -2468,9 +2468,10 @@ op_insert(oap, count1) 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) + /* 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,8 +2602,9 @@ op_change(oap) /* * 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) + 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. */