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