summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-04-29 14:44:35 +0200
committerBram Moolenaar <Bram@vim.org>2014-04-29 14:44:35 +0200
commit3d1956bcc9b2f606a8b6b03b3852a6eed9847348 (patch)
treef61d0ca0c5c918e37dba41610ae6b065061294e9 /src/edit.c
parent355a95a079d3c8c64cf496df434741891d07985a (diff)
updated for version 7.4.269v7.4.269
Problem: CTRL-U in Insert mode does not work after using a cursor key. (Pine Wu) Solution: Use the original insert start position. (Christian Brabandt)
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/edit.c b/src/edit.c
index 24010c8d9c..a0ad9aaed7 100644
--- 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 == 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