summaryrefslogtreecommitdiff
path: root/src/normal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-02-05 01:18:48 +0100
committerBram Moolenaar <Bram@vim.org>2012-02-05 01:18:48 +0100
commitbe094a157913535d46cc6ac39465ce1ea7dae132 (patch)
treeef66aa86500e55299f1a338cb7cc3d6b0632d2e7 /src/normal.c
parente37c611012a8b0b822e9d60baacd642c20c07851 (diff)
downloadvim-git-be094a157913535d46cc6ac39465ce1ea7dae132.tar.gz
updated for version 7.3.429v7.3.429
Problem: When 'cpoptions' includes "E" "c0" in the first column is an error. The redo register is then set to the errornous command. Solution: Do not set the redo register if the command fails because of an empty region. (Hideki Eiraku)
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/normal.c b/src/normal.c
index a6cd2d6b2..aa470e4f7 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -1978,7 +1978,10 @@ do_pending_operator(cap, old_col, gui_yank)
VIsual_reselect = FALSE; /* don't reselect now */
#endif
if (empty_region_error)
+ {
vim_beep();
+ CancelRedo();
+ }
else
{
(void)op_delete(oap);
@@ -1992,7 +1995,10 @@ do_pending_operator(cap, old_col, gui_yank)
if (empty_region_error)
{
if (!gui_yank)
+ {
vim_beep();
+ CancelRedo();
+ }
}
else
(void)op_yank(oap, FALSE, !gui_yank);
@@ -2004,7 +2010,10 @@ do_pending_operator(cap, old_col, gui_yank)
VIsual_reselect = FALSE; /* don't reselect now */
#endif
if (empty_region_error)
+ {
vim_beep();
+ CancelRedo();
+ }
else
{
/* This is a new edit command, not a restart. Need to
@@ -2066,7 +2075,10 @@ do_pending_operator(cap, old_col, gui_yank)
case OP_LOWER:
case OP_ROT13:
if (empty_region_error)
+ {
vim_beep();
+ CancelRedo();
+ }
else
op_tilde(oap);
check_cursor_col();
@@ -2099,7 +2111,10 @@ do_pending_operator(cap, old_col, gui_yank)
#endif
#ifdef FEAT_VISUALEXTRA
if (empty_region_error)
+ {
vim_beep();
+ CancelRedo();
+ }
else
{
/* This is a new edit command, not a restart. Need to
@@ -2129,7 +2144,10 @@ do_pending_operator(cap, old_col, gui_yank)
#ifdef FEAT_VISUALEXTRA
if (empty_region_error)
#endif
+ {
vim_beep();
+ CancelRedo();
+ }
#ifdef FEAT_VISUALEXTRA
else
op_replace(oap, cap->nchar);