diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-04-10 14:55:34 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-04-10 14:55:34 +0000 |
commit | 779b74b2a23643aaac026341a4ed8bd6e04371e6 (patch) | |
tree | ff8fae99da608c087d6b56075dac7c0e73a7e1d7 /src/popupmnu.c | |
parent | c6fe919573e82727a7de014daab122ffc5001854 (diff) | |
download | vim-git-779b74b2a23643aaac026341a4ed8bd6e04371e6.tar.gz |
updated for version 7.0dv7.0d
Diffstat (limited to 'src/popupmnu.c')
-rw-r--r-- | src/popupmnu.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/popupmnu.c b/src/popupmnu.c index 9f1fae4fb..a3324772c 100644 --- a/src/popupmnu.c +++ b/src/popupmnu.c @@ -427,18 +427,24 @@ pum_set_selected(n) while (!bufempty()) ml_delete((linenr_T)1, FALSE); } - else if ((res = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, 0)) - == OK) + else { - /* Edit a new, empty buffer. Set options for a "wipeout" - * buffer. */ - set_option_value((char_u *)"swf", 0L, NULL, OPT_LOCAL); - set_option_value((char_u *)"bt", 0L, (char_u *)"nofile", - OPT_LOCAL); - set_option_value((char_u *)"bh", 0L, (char_u *)"wipe", - OPT_LOCAL); - set_option_value((char_u *)"diff", 0L, (char_u *)"", - OPT_LOCAL); + /* Don't want to sync undo in the current buffer. */ + ++no_u_sync; + res = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, 0); + --no_u_sync; + if (res == OK) + { + /* Edit a new, empty buffer. Set options for a "wipeout" + * buffer. */ + set_option_value((char_u *)"swf", 0L, NULL, OPT_LOCAL); + set_option_value((char_u *)"bt", 0L, + (char_u *)"nofile", OPT_LOCAL); + set_option_value((char_u *)"bh", 0L, + (char_u *)"wipe", OPT_LOCAL); + set_option_value((char_u *)"diff", 0L, + (char_u *)"", OPT_LOCAL); + } } if (res == OK) { |