mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.4.067
Problem: After inserting comment leader, CTRL-\ CTRL-O does move the cursor. (Wiktor Ruben) Solution: Avoid moving the cursor. (Christian Brabandt)
This commit is contained in:
11
src/edit.c
11
src/edit.c
@@ -199,7 +199,7 @@ static void check_spell_redraw __ARGS((void));
|
|||||||
static void spell_back_to_badword __ARGS((void));
|
static void spell_back_to_badword __ARGS((void));
|
||||||
static int spell_bad_len = 0; /* length of located bad word */
|
static int spell_bad_len = 0; /* length of located bad word */
|
||||||
#endif
|
#endif
|
||||||
static void stop_insert __ARGS((pos_T *end_insert_pos, int esc));
|
static void stop_insert __ARGS((pos_T *end_insert_pos, int esc, int nomove));
|
||||||
static int echeck_abbr __ARGS((int));
|
static int echeck_abbr __ARGS((int));
|
||||||
static int replace_pop __ARGS((void));
|
static int replace_pop __ARGS((void));
|
||||||
static void replace_join __ARGS((int off));
|
static void replace_join __ARGS((int off));
|
||||||
@@ -6698,7 +6698,7 @@ start_arrow(end_insert_pos)
|
|||||||
if (!arrow_used) /* something has been inserted */
|
if (!arrow_used) /* something has been inserted */
|
||||||
{
|
{
|
||||||
AppendToRedobuff(ESC_STR);
|
AppendToRedobuff(ESC_STR);
|
||||||
stop_insert(end_insert_pos, FALSE);
|
stop_insert(end_insert_pos, FALSE, FALSE);
|
||||||
arrow_used = TRUE; /* this means we stopped the current insert */
|
arrow_used = TRUE; /* this means we stopped the current insert */
|
||||||
}
|
}
|
||||||
#ifdef FEAT_SPELL
|
#ifdef FEAT_SPELL
|
||||||
@@ -6787,9 +6787,10 @@ stop_arrow()
|
|||||||
* to another window/buffer.
|
* to another window/buffer.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
stop_insert(end_insert_pos, esc)
|
stop_insert(end_insert_pos, esc, nomove)
|
||||||
pos_T *end_insert_pos;
|
pos_T *end_insert_pos;
|
||||||
int esc; /* called by ins_esc() */
|
int esc; /* called by ins_esc() */
|
||||||
|
int nomove; /* <c-\><c-o>, don't move cursor */
|
||||||
{
|
{
|
||||||
int cc;
|
int cc;
|
||||||
char_u *ptr;
|
char_u *ptr;
|
||||||
@@ -6860,7 +6861,7 @@ stop_insert(end_insert_pos, esc)
|
|||||||
* Do this when ESC was used or moving the cursor up/down.
|
* Do this when ESC was used or moving the cursor up/down.
|
||||||
* Check for the old position still being valid, just in case the text
|
* Check for the old position still being valid, just in case the text
|
||||||
* got changed unexpectedly. */
|
* got changed unexpectedly. */
|
||||||
if (did_ai && (esc || (vim_strchr(p_cpo, CPO_INDENT) == NULL
|
if (!nomove && did_ai && (esc || (vim_strchr(p_cpo, CPO_INDENT) == NULL
|
||||||
&& curwin->w_cursor.lnum != end_insert_pos->lnum))
|
&& curwin->w_cursor.lnum != end_insert_pos->lnum))
|
||||||
&& end_insert_pos->lnum <= curbuf->b_ml.ml_line_count)
|
&& end_insert_pos->lnum <= curbuf->b_ml.ml_line_count)
|
||||||
{
|
{
|
||||||
@@ -8377,7 +8378,7 @@ ins_esc(count, cmdchar, nomove)
|
|||||||
disabled_redraw = TRUE;
|
disabled_redraw = TRUE;
|
||||||
return FALSE; /* repeat the insert */
|
return FALSE; /* repeat the insert */
|
||||||
}
|
}
|
||||||
stop_insert(&curwin->w_cursor, TRUE);
|
stop_insert(&curwin->w_cursor, TRUE, nomove);
|
||||||
undisplay_dollar();
|
undisplay_dollar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -738,6 +738,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
67,
|
||||||
/**/
|
/**/
|
||||||
66,
|
66,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user