|
Karsten Hopp |
e3997e |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
e3997e |
Subject: Patch 7.4.849
|
|
Karsten Hopp |
e3997e |
Fcc: outbox
|
|
Karsten Hopp |
e3997e |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
e3997e |
Mime-Version: 1.0
|
|
Karsten Hopp |
e3997e |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
e3997e |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
e3997e |
------------
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
Patch 7.4.849
|
|
Karsten Hopp |
e3997e |
Problem: Moving the cursor in Insert mode starts new undo sequence.
|
|
Karsten Hopp |
e3997e |
Solution: Add CTRL-G U to keep the undo sequence for the following cursor
|
|
Karsten Hopp |
e3997e |
movement command. (Christian Brabandt)
|
|
Karsten Hopp |
e3997e |
Files: runtime/doc/insert.txt, src/edit.c, src/testdir/test_mapping.in,
|
|
Karsten Hopp |
e3997e |
src/testdir/test_mapping.ok
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
*** ../vim-7.4.848/runtime/doc/insert.txt 2013-08-10 13:24:56.000000000 +0200
|
|
Karsten Hopp |
e3997e |
--- runtime/doc/insert.txt 2015-09-01 19:00:11.780862669 +0200
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 373,378 ****
|
|
Karsten Hopp |
e3997e |
--- 377,385 ----
|
|
Karsten Hopp |
e3997e |
CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O*
|
|
Karsten Hopp |
e3997e |
CTRL-L when 'insertmode' is set: go to Normal mode *i_CTRL-L*
|
|
Karsten Hopp |
e3997e |
CTRL-G u break undo sequence, start new change *i_CTRL-G_u*
|
|
Karsten Hopp |
e3997e |
+ CTRL-G U don't break undo with next left/right cursor *i_CTRL-G_U*
|
|
Karsten Hopp |
e3997e |
+ movement (but only if the cursor stays
|
|
Karsten Hopp |
e3997e |
+ within same the line)
|
|
Karsten Hopp |
e3997e |
-----------------------------------------------------------------------
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
Note: If the cursor keys take you out of Insert mode, check the 'noesckeys'
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 412,417 ****
|
|
Karsten Hopp |
e3997e |
--- 419,446 ----
|
|
Karsten Hopp |
e3997e |
This breaks undo at each line break. It also expands abbreviations before
|
|
Karsten Hopp |
e3997e |
this.
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
+ An example for using CTRL-G U: >
|
|
Karsten Hopp |
e3997e |
+
|
|
Karsten Hopp |
e3997e |
+ inoremap <Left> <C-G>U<Left>
|
|
Karsten Hopp |
e3997e |
+ inoremap <Right> <C-G>U<Right>
|
|
Karsten Hopp |
e3997e |
+ inoremap <expr> <Home> col('.') == match(getline('.'), '\S') + 1 ?
|
|
Karsten Hopp |
e3997e |
+ \ repeat('<C-G>U<Left>', col('.') - 1) :
|
|
Karsten Hopp |
e3997e |
+ \ (col('.') < match(getline('.'), '\S') ?
|
|
Karsten Hopp |
e3997e |
+ \ repeat('<C-G>U<Right>', match(getline('.'), '\S') + 0) :
|
|
Karsten Hopp |
e3997e |
+ \ repeat('<C-G>U<Left>', col('.') - 1 - match(getline('.'), '\S')))
|
|
Karsten Hopp |
e3997e |
+ inoremap <expr> <End> repeat('<C-G>U<Right>', col('$') - col('.'))
|
|
Karsten Hopp |
e3997e |
+ inoremap ( ()<C-G>U<Left>
|
|
Karsten Hopp |
e3997e |
+
|
|
Karsten Hopp |
e3997e |
+ This makes it possible to use the cursor keys in Insert mode, without breaking
|
|
Karsten Hopp |
e3997e |
+ the undo sequence and therefore using |.| (redo) will work as expected.
|
|
Karsten Hopp |
e3997e |
+ Also entering a text like (with the "(" mapping from above): >
|
|
Karsten Hopp |
e3997e |
+
|
|
Karsten Hopp |
e3997e |
+ Lorem ipsum (dolor
|
|
Karsten Hopp |
e3997e |
+
|
|
Karsten Hopp |
e3997e |
+ will be repeatable by the |.|to the expected
|
|
Karsten Hopp |
e3997e |
+
|
|
Karsten Hopp |
e3997e |
+ Lorem ipsum (dolor)
|
|
Karsten Hopp |
e3997e |
+
|
|
Karsten Hopp |
e3997e |
Using CTRL-O splits undo: the text typed before and after it is undone
|
|
Karsten Hopp |
e3997e |
separately. If you want to avoid this (e.g., in a mapping) you might be able
|
|
Karsten Hopp |
e3997e |
to use CTRL-R = |i_CTRL-R|. E.g., to call a function: >
|
|
Karsten Hopp |
e3997e |
*** ../vim-7.4.848/src/edit.c 2015-07-28 21:17:31.526069349 +0200
|
|
Karsten Hopp |
e3997e |
--- src/edit.c 2015-09-01 19:15:52.938978211 +0200
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 202,207 ****
|
|
Karsten Hopp |
e3997e |
--- 202,209 ----
|
|
Karsten Hopp |
e3997e |
static void check_auto_format __ARGS((int));
|
|
Karsten Hopp |
e3997e |
static void redo_literal __ARGS((int c));
|
|
Karsten Hopp |
e3997e |
static void start_arrow __ARGS((pos_T *end_insert_pos));
|
|
Karsten Hopp |
e3997e |
+ static void start_arrow_with_change __ARGS((pos_T *end_insert_pos, int change));
|
|
Karsten Hopp |
e3997e |
+ static void start_arrow_common __ARGS((pos_T *end_insert_pos, int change));
|
|
Karsten Hopp |
e3997e |
#ifdef FEAT_SPELL
|
|
Karsten Hopp |
e3997e |
static void check_spell_redraw __ARGS((void));
|
|
Karsten Hopp |
e3997e |
static void spell_back_to_badword __ARGS((void));
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 241,251 ****
|
|
Karsten Hopp |
e3997e |
#if defined(FEAT_GUI_TABLINE) || defined(PROTO)
|
|
Karsten Hopp |
e3997e |
static void ins_tabline __ARGS((int c));
|
|
Karsten Hopp |
e3997e |
#endif
|
|
Karsten Hopp |
e3997e |
! static void ins_left __ARGS((void));
|
|
Karsten Hopp |
e3997e |
static void ins_home __ARGS((int c));
|
|
Karsten Hopp |
e3997e |
static void ins_end __ARGS((int c));
|
|
Karsten Hopp |
e3997e |
static void ins_s_left __ARGS((void));
|
|
Karsten Hopp |
e3997e |
! static void ins_right __ARGS((void));
|
|
Karsten Hopp |
e3997e |
static void ins_s_right __ARGS((void));
|
|
Karsten Hopp |
e3997e |
static void ins_up __ARGS((int startcol));
|
|
Karsten Hopp |
e3997e |
static void ins_pageup __ARGS((void));
|
|
Karsten Hopp |
e3997e |
--- 243,253 ----
|
|
Karsten Hopp |
e3997e |
#if defined(FEAT_GUI_TABLINE) || defined(PROTO)
|
|
Karsten Hopp |
e3997e |
static void ins_tabline __ARGS((int c));
|
|
Karsten Hopp |
e3997e |
#endif
|
|
Karsten Hopp |
e3997e |
! static void ins_left __ARGS((int end_change));
|
|
Karsten Hopp |
e3997e |
static void ins_home __ARGS((int c));
|
|
Karsten Hopp |
e3997e |
static void ins_end __ARGS((int c));
|
|
Karsten Hopp |
e3997e |
static void ins_s_left __ARGS((void));
|
|
Karsten Hopp |
e3997e |
! static void ins_right __ARGS((int end_change));
|
|
Karsten Hopp |
e3997e |
static void ins_s_right __ARGS((void));
|
|
Karsten Hopp |
e3997e |
static void ins_up __ARGS((int startcol));
|
|
Karsten Hopp |
e3997e |
static void ins_pageup __ARGS((void));
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 297,302 ****
|
|
Karsten Hopp |
e3997e |
--- 299,306 ----
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
static int did_add_space = FALSE; /* auto_format() added an extra space
|
|
Karsten Hopp |
e3997e |
under the cursor */
|
|
Karsten Hopp |
e3997e |
+ static int dont_sync_undo = FALSE; /* CTRL-G U prevents syncing undo for
|
|
Karsten Hopp |
e3997e |
+ the next left/right cursor */
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
/*
|
|
Karsten Hopp |
e3997e |
* edit(): Start inserting text.
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 767,772 ****
|
|
Karsten Hopp |
e3997e |
--- 771,782 ----
|
|
Karsten Hopp |
e3997e |
*/
|
|
Karsten Hopp |
e3997e |
if (c != K_CURSORHOLD)
|
|
Karsten Hopp |
e3997e |
lastc = c; /* remember the previous char for CTRL-D */
|
|
Karsten Hopp |
e3997e |
+
|
|
Karsten Hopp |
e3997e |
+ /* After using CTRL-G U the next cursor key will not break undo. */
|
|
Karsten Hopp |
e3997e |
+ if (dont_sync_undo == MAYBE)
|
|
Karsten Hopp |
e3997e |
+ dont_sync_undo = TRUE;
|
|
Karsten Hopp |
e3997e |
+ else
|
|
Karsten Hopp |
e3997e |
+ dont_sync_undo = FALSE;
|
|
Karsten Hopp |
e3997e |
do
|
|
Karsten Hopp |
e3997e |
{
|
|
Karsten Hopp |
e3997e |
c = safe_vgetc();
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 1237,1243 ****
|
|
Karsten Hopp |
e3997e |
if (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_CTRL))
|
|
Karsten Hopp |
e3997e |
ins_s_left();
|
|
Karsten Hopp |
e3997e |
else
|
|
Karsten Hopp |
e3997e |
! ins_left();
|
|
Karsten Hopp |
e3997e |
break;
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
case K_S_LEFT: /* <S-Left> */
|
|
Karsten Hopp |
e3997e |
--- 1247,1253 ----
|
|
Karsten Hopp |
e3997e |
if (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_CTRL))
|
|
Karsten Hopp |
e3997e |
ins_s_left();
|
|
Karsten Hopp |
e3997e |
else
|
|
Karsten Hopp |
e3997e |
! ins_left(dont_sync_undo == FALSE);
|
|
Karsten Hopp |
e3997e |
break;
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
case K_S_LEFT: /* <S-Left> */
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 1249,1255 ****
|
|
Karsten Hopp |
e3997e |
if (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_CTRL))
|
|
Karsten Hopp |
e3997e |
ins_s_right();
|
|
Karsten Hopp |
e3997e |
else
|
|
Karsten Hopp |
e3997e |
! ins_right();
|
|
Karsten Hopp |
e3997e |
break;
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
case K_S_RIGHT: /* <S-Right> */
|
|
Karsten Hopp |
e3997e |
--- 1259,1265 ----
|
|
Karsten Hopp |
e3997e |
if (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_CTRL))
|
|
Karsten Hopp |
e3997e |
ins_s_right();
|
|
Karsten Hopp |
e3997e |
else
|
|
Karsten Hopp |
e3997e |
! ins_right(dont_sync_undo == FALSE);
|
|
Karsten Hopp |
e3997e |
break;
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
case K_S_RIGHT: /* <S-Right> */
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 6787,6795 ****
|
|
Karsten Hopp |
e3997e |
*/
|
|
Karsten Hopp |
e3997e |
static void
|
|
Karsten Hopp |
e3997e |
start_arrow(end_insert_pos)
|
|
Karsten Hopp |
e3997e |
! pos_T *end_insert_pos; /* can be NULL */
|
|
Karsten Hopp |
e3997e |
{
|
|
Karsten Hopp |
e3997e |
! if (!arrow_used) /* something has been inserted */
|
|
Karsten Hopp |
e3997e |
{
|
|
Karsten Hopp |
e3997e |
AppendToRedobuff(ESC_STR);
|
|
Karsten Hopp |
e3997e |
stop_insert(end_insert_pos, FALSE, FALSE);
|
|
Karsten Hopp |
e3997e |
--- 6797,6830 ----
|
|
Karsten Hopp |
e3997e |
*/
|
|
Karsten Hopp |
e3997e |
static void
|
|
Karsten Hopp |
e3997e |
start_arrow(end_insert_pos)
|
|
Karsten Hopp |
e3997e |
! pos_T *end_insert_pos; /* can be NULL */
|
|
Karsten Hopp |
e3997e |
! {
|
|
Karsten Hopp |
e3997e |
! start_arrow_common(end_insert_pos, TRUE);
|
|
Karsten Hopp |
e3997e |
! }
|
|
Karsten Hopp |
e3997e |
!
|
|
Karsten Hopp |
e3997e |
! /*
|
|
Karsten Hopp |
e3997e |
! * Like start_arrow() but with end_change argument.
|
|
Karsten Hopp |
e3997e |
! * Will prepare for redo of CTRL-G U if "end_change" is FALSE.
|
|
Karsten Hopp |
e3997e |
! */
|
|
Karsten Hopp |
e3997e |
! static void
|
|
Karsten Hopp |
e3997e |
! start_arrow_with_change(end_insert_pos, end_change)
|
|
Karsten Hopp |
e3997e |
! pos_T *end_insert_pos; /* can be NULL */
|
|
Karsten Hopp |
e3997e |
! int end_change; /* end undoable change */
|
|
Karsten Hopp |
e3997e |
{
|
|
Karsten Hopp |
e3997e |
! start_arrow_common(end_insert_pos, end_change);
|
|
Karsten Hopp |
e3997e |
! if (!end_change)
|
|
Karsten Hopp |
e3997e |
! {
|
|
Karsten Hopp |
e3997e |
! AppendCharToRedobuff(Ctrl_G);
|
|
Karsten Hopp |
e3997e |
! AppendCharToRedobuff('U');
|
|
Karsten Hopp |
e3997e |
! }
|
|
Karsten Hopp |
e3997e |
! }
|
|
Karsten Hopp |
e3997e |
!
|
|
Karsten Hopp |
e3997e |
! static void
|
|
Karsten Hopp |
e3997e |
! start_arrow_common(end_insert_pos, end_change)
|
|
Karsten Hopp |
e3997e |
! pos_T *end_insert_pos; /* can be NULL */
|
|
Karsten Hopp |
e3997e |
! int end_change; /* end undoable change */
|
|
Karsten Hopp |
e3997e |
! {
|
|
Karsten Hopp |
e3997e |
! if (!arrow_used && end_change) /* something has been inserted */
|
|
Karsten Hopp |
e3997e |
{
|
|
Karsten Hopp |
e3997e |
AppendToRedobuff(ESC_STR);
|
|
Karsten Hopp |
e3997e |
stop_insert(end_insert_pos, FALSE, FALSE);
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 8359,8364 ****
|
|
Karsten Hopp |
e3997e |
--- 8394,8406 ----
|
|
Karsten Hopp |
e3997e |
Insstart = curwin->w_cursor;
|
|
Karsten Hopp |
e3997e |
break;
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
+ /* CTRL-G U: do not break undo with the next char */
|
|
Karsten Hopp |
e3997e |
+ case 'U':
|
|
Karsten Hopp |
e3997e |
+ /* Allow one left/right cursor movement with the next char,
|
|
Karsten Hopp |
e3997e |
+ * without breaking undo. */
|
|
Karsten Hopp |
e3997e |
+ dont_sync_undo = MAYBE;
|
|
Karsten Hopp |
e3997e |
+ break;
|
|
Karsten Hopp |
e3997e |
+
|
|
Karsten Hopp |
e3997e |
/* Unknown CTRL-G command, reserved for future expansion. */
|
|
Karsten Hopp |
e3997e |
default: vim_beep(BO_CTRLG);
|
|
Karsten Hopp |
e3997e |
}
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 9440,9446 ****
|
|
Karsten Hopp |
e3997e |
#endif
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
static void
|
|
Karsten Hopp |
e3997e |
! ins_left()
|
|
Karsten Hopp |
e3997e |
{
|
|
Karsten Hopp |
e3997e |
pos_T tpos;
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
--- 9482,9489 ----
|
|
Karsten Hopp |
e3997e |
#endif
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
static void
|
|
Karsten Hopp |
e3997e |
! ins_left(end_change)
|
|
Karsten Hopp |
e3997e |
! int end_change; /* end undoable change */
|
|
Karsten Hopp |
e3997e |
{
|
|
Karsten Hopp |
e3997e |
pos_T tpos;
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 9457,9463 ****
|
|
Karsten Hopp |
e3997e |
* break undo. K_LEFT is inserted in im_correct_cursor(). */
|
|
Karsten Hopp |
e3997e |
if (!im_is_preediting())
|
|
Karsten Hopp |
e3997e |
#endif
|
|
Karsten Hopp |
e3997e |
! start_arrow(&tpos);
|
|
Karsten Hopp |
e3997e |
#ifdef FEAT_RIGHTLEFT
|
|
Karsten Hopp |
e3997e |
/* If exit reversed string, position is fixed */
|
|
Karsten Hopp |
e3997e |
if (revins_scol != -1 && (int)curwin->w_cursor.col >= revins_scol)
|
|
Karsten Hopp |
e3997e |
--- 9500,9510 ----
|
|
Karsten Hopp |
e3997e |
* break undo. K_LEFT is inserted in im_correct_cursor(). */
|
|
Karsten Hopp |
e3997e |
if (!im_is_preediting())
|
|
Karsten Hopp |
e3997e |
#endif
|
|
Karsten Hopp |
e3997e |
! {
|
|
Karsten Hopp |
e3997e |
! start_arrow_with_change(&tpos, end_change);
|
|
Karsten Hopp |
e3997e |
! if (!end_change)
|
|
Karsten Hopp |
e3997e |
! AppendCharToRedobuff(K_LEFT);
|
|
Karsten Hopp |
e3997e |
! }
|
|
Karsten Hopp |
e3997e |
#ifdef FEAT_RIGHTLEFT
|
|
Karsten Hopp |
e3997e |
/* If exit reversed string, position is fixed */
|
|
Karsten Hopp |
e3997e |
if (revins_scol != -1 && (int)curwin->w_cursor.col >= revins_scol)
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 9472,9477 ****
|
|
Karsten Hopp |
e3997e |
--- 9519,9525 ----
|
|
Karsten Hopp |
e3997e |
*/
|
|
Karsten Hopp |
e3997e |
else if (vim_strchr(p_ww, '[') != NULL && curwin->w_cursor.lnum > 1)
|
|
Karsten Hopp |
e3997e |
{
|
|
Karsten Hopp |
e3997e |
+ /* always break undo when moving upwards/downwards, else undo may break */
|
|
Karsten Hopp |
e3997e |
start_arrow(&tpos);
|
|
Karsten Hopp |
e3997e |
--(curwin->w_cursor.lnum);
|
|
Karsten Hopp |
e3997e |
coladvance((colnr_T)MAXCOL);
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 9479,9484 ****
|
|
Karsten Hopp |
e3997e |
--- 9527,9533 ----
|
|
Karsten Hopp |
e3997e |
}
|
|
Karsten Hopp |
e3997e |
else
|
|
Karsten Hopp |
e3997e |
vim_beep(BO_CRSR);
|
|
Karsten Hopp |
e3997e |
+ dont_sync_undo = FALSE;
|
|
Karsten Hopp |
e3997e |
}
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
static void
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 9542,9548 ****
|
|
Karsten Hopp |
e3997e |
}
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
static void
|
|
Karsten Hopp |
e3997e |
! ins_right()
|
|
Karsten Hopp |
e3997e |
{
|
|
Karsten Hopp |
e3997e |
#ifdef FEAT_FOLDING
|
|
Karsten Hopp |
e3997e |
if ((fdo_flags & FDO_HOR) && KeyTyped)
|
|
Karsten Hopp |
e3997e |
--- 9591,9598 ----
|
|
Karsten Hopp |
e3997e |
}
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
static void
|
|
Karsten Hopp |
e3997e |
! ins_right(end_change)
|
|
Karsten Hopp |
e3997e |
! int end_change; /* end undoable change */
|
|
Karsten Hopp |
e3997e |
{
|
|
Karsten Hopp |
e3997e |
#ifdef FEAT_FOLDING
|
|
Karsten Hopp |
e3997e |
if ((fdo_flags & FDO_HOR) && KeyTyped)
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 9555,9561 ****
|
|
Karsten Hopp |
e3997e |
#endif
|
|
Karsten Hopp |
e3997e |
)
|
|
Karsten Hopp |
e3997e |
{
|
|
Karsten Hopp |
e3997e |
! start_arrow(&curwin->w_cursor);
|
|
Karsten Hopp |
e3997e |
curwin->w_set_curswant = TRUE;
|
|
Karsten Hopp |
e3997e |
#ifdef FEAT_VIRTUALEDIT
|
|
Karsten Hopp |
e3997e |
if (virtual_active())
|
|
Karsten Hopp |
e3997e |
--- 9605,9613 ----
|
|
Karsten Hopp |
e3997e |
#endif
|
|
Karsten Hopp |
e3997e |
)
|
|
Karsten Hopp |
e3997e |
{
|
|
Karsten Hopp |
e3997e |
! start_arrow_with_change(&curwin->w_cursor, end_change);
|
|
Karsten Hopp |
e3997e |
! if (!end_change)
|
|
Karsten Hopp |
e3997e |
! AppendCharToRedobuff(K_RIGHT);
|
|
Karsten Hopp |
e3997e |
curwin->w_set_curswant = TRUE;
|
|
Karsten Hopp |
e3997e |
#ifdef FEAT_VIRTUALEDIT
|
|
Karsten Hopp |
e3997e |
if (virtual_active())
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 9589,9594 ****
|
|
Karsten Hopp |
e3997e |
--- 9641,9647 ----
|
|
Karsten Hopp |
e3997e |
}
|
|
Karsten Hopp |
e3997e |
else
|
|
Karsten Hopp |
e3997e |
vim_beep(BO_CRSR);
|
|
Karsten Hopp |
e3997e |
+ dont_sync_undo = FALSE;
|
|
Karsten Hopp |
e3997e |
}
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
static void
|
|
Karsten Hopp |
e3997e |
*** ../vim-7.4.848/src/testdir/test_mapping.in 2015-07-10 17:19:25.024620239 +0200
|
|
Karsten Hopp |
e3997e |
--- src/testdir/test_mapping.in 2015-09-01 18:57:22.578641036 +0200
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 45,50 ****
|
|
Karsten Hopp |
e3997e |
--- 45,65 ----
|
|
Karsten Hopp |
e3997e |
:/^a b
|
|
Karsten Hopp |
e3997e |
0qqdw.ifoo?qj0@q?:unmap .
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
+ :" <c-g>U<cursor> works only within a single line
|
|
Karsten Hopp |
e3997e |
+ :imapclear
|
|
Karsten Hopp |
e3997e |
+ :imap ( ()<c-g>U<left>
|
|
Karsten Hopp |
e3997e |
+ G2o?ki
|
|
Karsten Hopp |
e3997e |
+ Test1: text with a (here some more text?k.
|
|
Karsten Hopp |
e3997e |
+ :" test undo
|
|
Karsten Hopp |
e3997e |
+ G2o?ki
|
|
Karsten Hopp |
e3997e |
+ Test2: text wit a (here some more text [und undo]?u?k.u
|
|
Karsten Hopp |
e3997e |
+ :"
|
|
Karsten Hopp |
e3997e |
+ :imapclear
|
|
Karsten Hopp |
e3997e |
+ :set whichwrap=<,>,[,]
|
|
Karsten Hopp |
e3997e |
+ G3o?2k
|
|
Karsten Hopp |
e3997e |
+ :exe ":norm! iTest3: text with a (parenthesis here\<C-G>U\<Right>new line here\<esc>\<up>\<up>."
|
|
Karsten Hopp |
e3997e |
+
|
|
Karsten Hopp |
e3997e |
+
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
:/^test/,$w! test.out
|
|
Karsten Hopp |
e3997e |
:qa!
|
|
Karsten Hopp |
e3997e |
*** ../vim-7.4.848/src/testdir/test_mapping.ok 2015-07-10 17:19:25.024620239 +0200
|
|
Karsten Hopp |
e3997e |
--- src/testdir/test_mapping.ok 2015-09-01 18:57:22.578641036 +0200
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 10,12 ****
|
|
Karsten Hopp |
e3997e |
--- 10,22 ----
|
|
Karsten Hopp |
e3997e |
+
|
|
Karsten Hopp |
e3997e |
+
|
|
Karsten Hopp |
e3997e |
+
|
|
Karsten Hopp |
e3997e |
+
|
|
Karsten Hopp |
e3997e |
+ Test1: text with a (here some more text)
|
|
Karsten Hopp |
e3997e |
+ Test1: text with a (here some more text)
|
|
Karsten Hopp |
e3997e |
+
|
|
Karsten Hopp |
e3997e |
+
|
|
Karsten Hopp |
e3997e |
+ Test2: text wit a (here some more text [und undo])
|
|
Karsten Hopp |
e3997e |
+
|
|
Karsten Hopp |
e3997e |
+ new line here
|
|
Karsten Hopp |
e3997e |
+ Test3: text with a (parenthesis here
|
|
Karsten Hopp |
e3997e |
+ new line here
|
|
Karsten Hopp |
e3997e |
*** ../vim-7.4.848/src/version.c 2015-09-01 18:51:35.126294303 +0200
|
|
Karsten Hopp |
e3997e |
--- src/version.c 2015-09-01 18:57:09.862774703 +0200
|
|
Karsten Hopp |
e3997e |
***************
|
|
Karsten Hopp |
e3997e |
*** 743,744 ****
|
|
Karsten Hopp |
e3997e |
--- 743,746 ----
|
|
Karsten Hopp |
e3997e |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
e3997e |
+ /**/
|
|
Karsten Hopp |
e3997e |
+ 849,
|
|
Karsten Hopp |
e3997e |
/**/
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
--
|
|
Karsten Hopp |
e3997e |
The chat program is in public domain. This is not the GNU public license.
|
|
Karsten Hopp |
e3997e |
If it breaks then you get to keep both pieces.
|
|
Karsten Hopp |
e3997e |
-- Copyright notice for the chat program
|
|
Karsten Hopp |
e3997e |
|
|
Karsten Hopp |
e3997e |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
e3997e |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
e3997e |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
e3997e |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|