diff options
author | Bram Moolenaar <Bram@vim.org> | 2009-07-09 13:55:43 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2009-07-09 13:55:43 +0000 |
commit | 8e258a4a94a7829d116b90c7519aaa34514a0a95 (patch) | |
tree | 6b6da35297a5bd57ad7913fafe4e4a974a691aea /src | |
parent | 8d5946760b26dca4f5999b58a2be62e285e8cc5f (diff) |
updated for version 7.2-223v7.2.223
Diffstat (limited to 'src')
-rw-r--r-- | src/ex_cmds.h | 2 | ||||
-rw-r--r-- | src/ex_docmd.c | 23 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 19 insertions, 8 deletions
diff --git a/src/ex_cmds.h b/src/ex_cmds.h index 49167505c6..bf66b40619 100644 --- a/src/ex_cmds.h +++ b/src/ex_cmds.h @@ -991,6 +991,8 @@ EX(CMD_unmap, "unmap", ex_unmap, BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), EX(CMD_unmenu, "unmenu", ex_menu, BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), +EX(CMD_unsilent, "unsilent", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN), EX(CMD_update, "update", ex_update, RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR), EX(CMD_vglobal, "vglobal", ex_global, diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 47c460cef4..627e5f88d5 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -1677,8 +1677,8 @@ do_one_cmd(cmdlinep, sourcing, char_u *errormsg = NULL; /* error message */ exarg_T ea; /* Ex command arguments */ long verbose_save = -1; - int save_msg_scroll = 0; - int did_silent = 0; + int save_msg_scroll = msg_scroll; + int save_msg_silent = -1; int did_esilent = 0; #ifdef HAVE_SANDBOX int did_sandbox = FALSE; @@ -1856,9 +1856,9 @@ do_one_cmd(cmdlinep, sourcing, } if (!checkforcmd(&ea.cmd, "silent", 3)) break; - ++did_silent; + if (save_msg_silent == -1) + save_msg_silent = msg_silent; ++msg_silent; - save_msg_scroll = msg_scroll; if (*ea.cmd == '!' && !vim_iswhite(ea.cmd[-1])) { /* ":silent!", but not "silent !cmd" */ @@ -1886,6 +1886,13 @@ do_one_cmd(cmdlinep, sourcing, #endif continue; + case 'u': if (!checkforcmd(&ea.cmd, "unsilent", 3)) + break; + if (save_msg_silent == -1) + save_msg_silent = msg_silent; + msg_silent = 0; + continue; + case 'v': if (checkforcmd(&ea.cmd, "vertical", 4)) { #ifdef FEAT_VERTSPLIT @@ -2684,13 +2691,12 @@ doend: cmdmod = save_cmdmod; - if (did_silent > 0) + if (save_msg_silent != -1) { /* messages could be enabled for a serious error, need to check if the * counters don't become negative */ - msg_silent -= did_silent; - if (msg_silent < 0) - msg_silent = 0; + if (!did_emsg) + msg_silent = save_msg_silent; emsg_silent -= did_esilent; if (emsg_silent < 0) emsg_silent = 0; @@ -2987,6 +2993,7 @@ static struct cmdmod {"silent", 3, FALSE}, {"tab", 3, TRUE}, {"topleft", 2, FALSE}, + {"unsilent", 3, FALSE}, {"verbose", 4, TRUE}, {"vertical", 4, FALSE}, }; diff --git a/src/version.c b/src/version.c index 3a95242562..fb0c3435b0 100644 --- a/src/version.c +++ b/src/version.c @@ -677,6 +677,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 223, +/**/ 222, /**/ 221, |