|
|
3ef2ca |
To: vim_dev@googlegroups.com
|
|
|
3ef2ca |
Subject: Patch 7.4.067
|
|
|
3ef2ca |
Fcc: outbox
|
|
|
3ef2ca |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
3ef2ca |
Mime-Version: 1.0
|
|
|
3ef2ca |
Content-Type: text/plain; charset=UTF-8
|
|
|
3ef2ca |
Content-Transfer-Encoding: 8bit
|
|
|
3ef2ca |
------------
|
|
|
3ef2ca |
|
|
|
3ef2ca |
Patch 7.4.067
|
|
|
3ef2ca |
Problem: After inserting comment leader, CTRL-\ CTRL-O does move the
|
|
|
3ef2ca |
cursor. (Wiktor Ruben)
|
|
|
3ef2ca |
Solution: Avoid moving the cursor. (Christian Brabandt)
|
|
|
3ef2ca |
Files: src/edit.c
|
|
|
3ef2ca |
|
|
|
3ef2ca |
|
|
|
3ef2ca |
*** ../vim-7.4.066/src/edit.c 2013-09-08 20:00:45.000000000 +0200
|
|
|
3ef2ca |
--- src/edit.c 2013-11-04 03:57:43.000000000 +0100
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 199,205 ****
|
|
|
3ef2ca |
static void spell_back_to_badword __ARGS((void));
|
|
|
3ef2ca |
static int spell_bad_len = 0; /* length of located bad word */
|
|
|
3ef2ca |
#endif
|
|
|
3ef2ca |
! static void stop_insert __ARGS((pos_T *end_insert_pos, int esc));
|
|
|
3ef2ca |
static int echeck_abbr __ARGS((int));
|
|
|
3ef2ca |
static int replace_pop __ARGS((void));
|
|
|
3ef2ca |
static void replace_join __ARGS((int off));
|
|
|
3ef2ca |
--- 199,205 ----
|
|
|
3ef2ca |
static void spell_back_to_badword __ARGS((void));
|
|
|
3ef2ca |
static int spell_bad_len = 0; /* length of located bad word */
|
|
|
3ef2ca |
#endif
|
|
|
3ef2ca |
! static void stop_insert __ARGS((pos_T *end_insert_pos, int esc, int nomove));
|
|
|
3ef2ca |
static int echeck_abbr __ARGS((int));
|
|
|
3ef2ca |
static int replace_pop __ARGS((void));
|
|
|
3ef2ca |
static void replace_join __ARGS((int off));
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 6698,6704 ****
|
|
|
3ef2ca |
if (!arrow_used) /* something has been inserted */
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
AppendToRedobuff(ESC_STR);
|
|
|
3ef2ca |
! stop_insert(end_insert_pos, FALSE);
|
|
|
3ef2ca |
arrow_used = TRUE; /* this means we stopped the current insert */
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
#ifdef FEAT_SPELL
|
|
|
3ef2ca |
--- 6698,6704 ----
|
|
|
3ef2ca |
if (!arrow_used) /* something has been inserted */
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
AppendToRedobuff(ESC_STR);
|
|
|
3ef2ca |
! stop_insert(end_insert_pos, FALSE, FALSE);
|
|
|
3ef2ca |
arrow_used = TRUE; /* this means we stopped the current insert */
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
#ifdef FEAT_SPELL
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 6787,6795 ****
|
|
|
3ef2ca |
* to another window/buffer.
|
|
|
3ef2ca |
*/
|
|
|
3ef2ca |
static void
|
|
|
3ef2ca |
! stop_insert(end_insert_pos, esc)
|
|
|
3ef2ca |
pos_T *end_insert_pos;
|
|
|
3ef2ca |
int esc; /* called by ins_esc() */
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
int cc;
|
|
|
3ef2ca |
char_u *ptr;
|
|
|
3ef2ca |
--- 6787,6796 ----
|
|
|
3ef2ca |
* to another window/buffer.
|
|
|
3ef2ca |
*/
|
|
|
3ef2ca |
static void
|
|
|
3ef2ca |
! stop_insert(end_insert_pos, esc, nomove)
|
|
|
3ef2ca |
pos_T *end_insert_pos;
|
|
|
3ef2ca |
int esc; /* called by ins_esc() */
|
|
|
3ef2ca |
+ int nomove; /* <c-\><c-o>, don't move cursor */
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
int cc;
|
|
|
3ef2ca |
char_u *ptr;
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 6860,6866 ****
|
|
|
3ef2ca |
* Do this when ESC was used or moving the cursor up/down.
|
|
|
3ef2ca |
* Check for the old position still being valid, just in case the text
|
|
|
3ef2ca |
* got changed unexpectedly. */
|
|
|
3ef2ca |
! if (did_ai && (esc || (vim_strchr(p_cpo, CPO_INDENT) == NULL
|
|
|
3ef2ca |
&& curwin->w_cursor.lnum != end_insert_pos->lnum))
|
|
|
3ef2ca |
&& end_insert_pos->lnum <= curbuf->b_ml.ml_line_count)
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
--- 6861,6867 ----
|
|
|
3ef2ca |
* Do this when ESC was used or moving the cursor up/down.
|
|
|
3ef2ca |
* Check for the old position still being valid, just in case the text
|
|
|
3ef2ca |
* got changed unexpectedly. */
|
|
|
3ef2ca |
! if (!nomove && did_ai && (esc || (vim_strchr(p_cpo, CPO_INDENT) == NULL
|
|
|
3ef2ca |
&& curwin->w_cursor.lnum != end_insert_pos->lnum))
|
|
|
3ef2ca |
&& end_insert_pos->lnum <= curbuf->b_ml.ml_line_count)
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 8377,8383 ****
|
|
|
3ef2ca |
disabled_redraw = TRUE;
|
|
|
3ef2ca |
return FALSE; /* repeat the insert */
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
! stop_insert(&curwin->w_cursor, TRUE);
|
|
|
3ef2ca |
undisplay_dollar();
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
|
|
|
3ef2ca |
--- 8378,8384 ----
|
|
|
3ef2ca |
disabled_redraw = TRUE;
|
|
|
3ef2ca |
return FALSE; /* repeat the insert */
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
! stop_insert(&curwin->w_cursor, TRUE, nomove);
|
|
|
3ef2ca |
undisplay_dollar();
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
|
|
|
3ef2ca |
*** ../vim-7.4.066/src/version.c 2013-11-04 02:53:46.000000000 +0100
|
|
|
3ef2ca |
--- src/version.c 2013-11-04 03:57:29.000000000 +0100
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 740,741 ****
|
|
|
3ef2ca |
--- 740,743 ----
|
|
|
3ef2ca |
{ /* Add new patch number below this line */
|
|
|
3ef2ca |
+ /**/
|
|
|
3ef2ca |
+ 67,
|
|
|
3ef2ca |
/**/
|
|
|
3ef2ca |
|
|
|
3ef2ca |
--
|
|
|
3ef2ca |
Beer & pretzels can't be served at the same time in any bar or restaurant.
|
|
|
3ef2ca |
[real standing law in North Dakota, United States of America]
|
|
|
3ef2ca |
|
|
|
3ef2ca |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
3ef2ca |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
3ef2ca |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
3ef2ca |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|