diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-06-15 17:54:43 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-06-15 17:54:43 +0200 |
commit | df9259abcee07f217e36f85f4fd77d059fb1bbe7 (patch) | |
tree | 6542d023d50d4ab2f417b1eed1d2c1981cbb7616 /src/edit.c | |
parent | dab38d516effcab23c8381545d4b1e6be38bce5b (diff) |
updated for version 7.3.1200v7.3.1200
Problem: When calling setline() from Insert mode, using CTRL-R =, undo does
not work properly. (Israel Chauca)
Solution: Sync undo after evaluating the expression. (Christian Brabandt)
Diffstat (limited to 'src/edit.c')
-rw-r--r-- | src/edit.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/edit.c b/src/edit.c index 4eab20eb6b..413740f70d 100644 --- a/src/edit.c +++ b/src/edit.c @@ -8126,10 +8126,8 @@ ins_reg() --no_mapping; #ifdef FEAT_EVAL - /* - * Don't call u_sync() while getting the expression, - * evaluating it or giving an error message for it! - */ + /* Don't call u_sync() while typing the expression or giving an error + * message for it. Only call it explicitly. */ ++no_u_sync; if (regname == '=') { @@ -8142,6 +8140,9 @@ ins_reg() if (im_on) im_set_active(TRUE); # endif + if (regname == '=') + /* sync undo, so the effect of e.g., setline() can be undone */ + u_sync(TRUE); } if (regname == NUL || !valid_yank_reg(regname, FALSE)) { |