On Mi, 23 Apr 2014, Christian Brabandt wrote:
> > Here we go. I added some more usage of i_Ctrl-U
>
> I think, it is actually reasonable, to expect an attachment. So let's
> try that again.
Okay, this is becoming ridiculous now.
Perhaps I need a couple of more attempts ;)
Best,
Christian
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/edit.c b/src/edit.c
--- a/src/edit.c
+++ b/src/edit.c
@@ -8760,8 +8760,8 @@ ins_bs(c, mode, inserted_space_p)
((curwin->w_cursor.lnum == 1 && curwin->w_cursor.col == 0)
|| (!can_bs(BS_START)
&& (arrow_used
- || (curwin->w_cursor.lnum == Insstart.lnum
- && curwin->w_cursor.col <= Insstart.col)))
+ || (curwin->w_cursor.lnum == Insstart_orig.lnum
+ && curwin->w_cursor.col <= Insstart_orig.col)))
|| (!can_bs(BS_INDENT) && !arrow_used && ai_col > 0
&& curwin->w_cursor.col <= ai_col)
|| (!can_bs(BS_EOL) && curwin->w_cursor.col == 0))))
@@ -8812,8 +8812,8 @@ ins_bs(c, mode, inserted_space_p)
*/
if (curwin->w_cursor.col == 0)
{
- lnum = Insstart.lnum;
- if (curwin->w_cursor.lnum == Insstart.lnum
+ lnum = Insstart_orig.lnum;
+ if (curwin->w_cursor.lnum == Insstart_orig.lnum
#ifdef FEAT_RIGHTLEFT
|| revins_on
#endif
@@ -8822,8 +8822,8 @@ ins_bs(c, mode, inserted_space_p)
if (u_save((linenr_T)(curwin->w_cursor.lnum - 2),
(linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL)
return FALSE;
- --Insstart.lnum;
- Insstart.col = MAXCOL;
+ --Insstart_orig.lnum;
+ Insstart_orig.col = MAXCOL;
}
/*
* In replace mode:
@@ -8981,9 +8981,9 @@ ins_bs(c, mode, inserted_space_p)
while (vcol < want_vcol)
{
/* Remember the first char we inserted */
- if (curwin->w_cursor.lnum == Insstart.lnum
- && curwin->w_cursor.col < Insstart.col)
- Insstart.col = curwin->w_cursor.col;
+ if (curwin->w_cursor.lnum == Insstart_orig.lnum
+ && curwin->w_cursor.col < Insstart_orig.col)
+ Insstart_orig.col = curwin->w_cursor.col;
#ifdef FEAT_VREPLACE
if (State & VREPLACE_FLAG)
@@ -9071,8 +9071,8 @@ ins_bs(c, mode, inserted_space_p)
revins_on ||
#endif
(curwin->w_cursor.col > mincol
- && (curwin->w_cursor.lnum != Insstart.lnum
- || curwin->w_cursor.col != Insstart.col)));
+ && (curwin->w_cursor.lnum != Insstart_orig.lnum
+ || curwin->w_cursor.col != Insstart_orig.col)));
did_backspace = TRUE;
}
#ifdef FEAT_SMARTINDENT
@@ -9090,9 +9090,9 @@ ins_bs(c, mode, inserted_space_p)
AppendCharToRedobuff(c);
/* If deleted before the insertion point, adjust it */
- if (curwin->w_cursor.lnum == Insstart.lnum
- && curwin->w_cursor.col < Insstart.col)
- Insstart.col = curwin->w_cursor.col;
+ if (curwin->w_cursor.lnum == Insstart_orig.lnum
+ && curwin->w_cursor.col < Insstart_orig.col)
+ Insstart_orig.col = curwin->w_cursor.col;
/* vi behaviour: the cursor moves backward but the character that
* was there remains visible
diff --git a/src/testdir/test29.in b/src/testdir/test29.in
--- a/src/testdir/test29.in
+++ b/src/testdir/test29.in
@@ -102,6 +102,34 @@ if (condition) // Remove the next commen
}
STARTTEST
+:" Test with backspace set to the non-compatible setting
+/^\d\+ this
+:set cp bs=2
+Avim1
+Avim2u
+:set cpo-=<
+:inoremap <c-u> <left><c-u>
+Avim3
+:iunmap <c-u>
+Avim4
+:" Test with backspace set to the compatible setting
+:set bs=
+A vim5A
+A vim6Azweiu
+:inoremap <c-u> <left><c-u>
+A vim7
+:set cp
+ENDTEST
+1 this shouldn't be deleted
+2 this shouldn't be deleted
+3 this shouldn't be deleted
+4 this should be deleted
+5 this shouldn't be deleted
+6 this shouldn't be deleted
+7 this shouldn't be deleted
+8 this shouldn't be deleted (not touched yet)
+
+STARTTEST
/^{/+1
:set comments=sO:*\ -,mO:*\ \ ,exO:*/
:set comments+=s1:/*,mb:*,ex:*/,://
diff --git a/src/testdir/test29.ok b/src/testdir/test29.ok
--- a/src/testdir/test29.ok
+++ b/src/testdir/test29.ok
@@ -62,6 +62,15 @@ if (condition) // Remove the next commen
action();
}
+1 this shouldn't be deleted
+2 this shouldn't be deleted
+3 this shouldn't be deleted
+4 this should be deleted3
+
+6 this shouldn't be deleted vim5
+7 this shouldn't be deleted vim6
+8 this shouldn't be deleted (not touched yet) vim7
+
{
/* Make sure the previous comment leader is not removed. */