|
Karsten Hopp |
f23d95 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
f23d95 |
Subject: Patch 7.3.879
|
|
Karsten Hopp |
f23d95 |
Fcc: outbox
|
|
Karsten Hopp |
f23d95 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
f23d95 |
Mime-Version: 1.0
|
|
Karsten Hopp |
f23d95 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
f23d95 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
f23d95 |
------------
|
|
Karsten Hopp |
f23d95 |
|
|
Karsten Hopp |
f23d95 |
Patch 7.3.879
|
|
Karsten Hopp |
f23d95 |
Problem: When using an ex command in operator pending mode, using Esc to
|
|
Karsten Hopp |
f23d95 |
abort the command still executes the operator. (David Bürgin)
|
|
Karsten Hopp |
f23d95 |
Solution: Clear the operator when the ex command fails. (Christian Brabandt)
|
|
Karsten Hopp |
f23d95 |
Files: src/normal.c
|
|
Karsten Hopp |
f23d95 |
|
|
Karsten Hopp |
f23d95 |
|
|
Karsten Hopp |
f23d95 |
*** ../vim-7.3.878/src/normal.c 2013-03-16 14:20:45.000000000 +0100
|
|
Karsten Hopp |
f23d95 |
--- src/normal.c 2013-04-05 16:54:13.000000000 +0200
|
|
Karsten Hopp |
f23d95 |
***************
|
|
Karsten Hopp |
f23d95 |
*** 5418,5423 ****
|
|
Karsten Hopp |
f23d95 |
--- 5418,5424 ----
|
|
Karsten Hopp |
f23d95 |
cmdarg_T *cap;
|
|
Karsten Hopp |
f23d95 |
{
|
|
Karsten Hopp |
f23d95 |
int old_p_im;
|
|
Karsten Hopp |
f23d95 |
+ int cmd_result;
|
|
Karsten Hopp |
f23d95 |
|
|
Karsten Hopp |
f23d95 |
#ifdef FEAT_VISUAL
|
|
Karsten Hopp |
f23d95 |
if (VIsual_active)
|
|
Karsten Hopp |
f23d95 |
***************
|
|
Karsten Hopp |
f23d95 |
*** 5449,5455 ****
|
|
Karsten Hopp |
f23d95 |
old_p_im = p_im;
|
|
Karsten Hopp |
f23d95 |
|
|
Karsten Hopp |
f23d95 |
/* get a command line and execute it */
|
|
Karsten Hopp |
f23d95 |
! do_cmdline(NULL, getexline, NULL,
|
|
Karsten Hopp |
f23d95 |
cap->oap->op_type != OP_NOP ? DOCMD_KEEPLINE : 0);
|
|
Karsten Hopp |
f23d95 |
|
|
Karsten Hopp |
f23d95 |
/* If 'insertmode' changed, enter or exit Insert mode */
|
|
Karsten Hopp |
f23d95 |
--- 5450,5456 ----
|
|
Karsten Hopp |
f23d95 |
old_p_im = p_im;
|
|
Karsten Hopp |
f23d95 |
|
|
Karsten Hopp |
f23d95 |
/* get a command line and execute it */
|
|
Karsten Hopp |
f23d95 |
! cmd_result = do_cmdline(NULL, getexline, NULL,
|
|
Karsten Hopp |
f23d95 |
cap->oap->op_type != OP_NOP ? DOCMD_KEEPLINE : 0);
|
|
Karsten Hopp |
f23d95 |
|
|
Karsten Hopp |
f23d95 |
/* If 'insertmode' changed, enter or exit Insert mode */
|
|
Karsten Hopp |
f23d95 |
***************
|
|
Karsten Hopp |
f23d95 |
*** 5461,5472 ****
|
|
Karsten Hopp |
f23d95 |
restart_edit = 0;
|
|
Karsten Hopp |
f23d95 |
}
|
|
Karsten Hopp |
f23d95 |
|
|
Karsten Hopp |
f23d95 |
! /* The start of the operator may have become invalid by the Ex
|
|
Karsten Hopp |
f23d95 |
! * command. */
|
|
Karsten Hopp |
f23d95 |
! if (cap->oap->op_type != OP_NOP
|
|
Karsten Hopp |
f23d95 |
&& (cap->oap->start.lnum > curbuf->b_ml.ml_line_count
|
|
Karsten Hopp |
f23d95 |
|| cap->oap->start.col >
|
|
Karsten Hopp |
f23d95 |
! (colnr_T)STRLEN(ml_get(cap->oap->start.lnum))))
|
|
Karsten Hopp |
f23d95 |
clearopbeep(cap->oap);
|
|
Karsten Hopp |
f23d95 |
}
|
|
Karsten Hopp |
f23d95 |
}
|
|
Karsten Hopp |
f23d95 |
--- 5462,5478 ----
|
|
Karsten Hopp |
f23d95 |
restart_edit = 0;
|
|
Karsten Hopp |
f23d95 |
}
|
|
Karsten Hopp |
f23d95 |
|
|
Karsten Hopp |
f23d95 |
! if (cmd_result == FAIL)
|
|
Karsten Hopp |
f23d95 |
! /* The Ex command failed, do not execute the operator. */
|
|
Karsten Hopp |
f23d95 |
! clearop(cap->oap);
|
|
Karsten Hopp |
f23d95 |
! else if (cap->oap->op_type != OP_NOP
|
|
Karsten Hopp |
f23d95 |
&& (cap->oap->start.lnum > curbuf->b_ml.ml_line_count
|
|
Karsten Hopp |
f23d95 |
|| cap->oap->start.col >
|
|
Karsten Hopp |
f23d95 |
! (colnr_T)STRLEN(ml_get(cap->oap->start.lnum))
|
|
Karsten Hopp |
f23d95 |
! || did_emsg
|
|
Karsten Hopp |
f23d95 |
! ))
|
|
Karsten Hopp |
f23d95 |
! /* The start of the operator has become invalid by the Ex command.
|
|
Karsten Hopp |
f23d95 |
! */
|
|
Karsten Hopp |
f23d95 |
clearopbeep(cap->oap);
|
|
Karsten Hopp |
f23d95 |
}
|
|
Karsten Hopp |
f23d95 |
}
|
|
Karsten Hopp |
f23d95 |
*** ../vim-7.3.878/src/version.c 2013-04-05 15:39:41.000000000 +0200
|
|
Karsten Hopp |
f23d95 |
--- src/version.c 2013-04-05 16:56:43.000000000 +0200
|
|
Karsten Hopp |
f23d95 |
***************
|
|
Karsten Hopp |
f23d95 |
*** 730,731 ****
|
|
Karsten Hopp |
f23d95 |
--- 730,733 ----
|
|
Karsten Hopp |
f23d95 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
f23d95 |
+ /**/
|
|
Karsten Hopp |
f23d95 |
+ 879,
|
|
Karsten Hopp |
f23d95 |
/**/
|
|
Karsten Hopp |
f23d95 |
|
|
Karsten Hopp |
f23d95 |
--
|
|
Karsten Hopp |
f23d95 |
~
|
|
Karsten Hopp |
f23d95 |
~
|
|
Karsten Hopp |
f23d95 |
~
|
|
Karsten Hopp |
f23d95 |
".signature" 4 lines, 50 characters written
|
|
Karsten Hopp |
f23d95 |
|
|
Karsten Hopp |
f23d95 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
f23d95 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
f23d95 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
f23d95 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|