diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-06-27 01:15:55 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-06-27 01:15:55 +0200 |
commit | a800b42975f7a62282cb90d8c61ef3cff2fe810a (patch) | |
tree | 9ecc9705a77dcc23b87ba2dffb9a06765625519a /src/ex_cmds.c | |
parent | d69980f9dd1a538e9ba4313616f3be452c95206d (diff) |
Add file save counter to undo information. Add undotree() function.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 53dc0adf38..e1d270ca52 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -5164,8 +5164,6 @@ outofmem: do_sub_msg(count_only) int count_only; /* used 'n' flag for ":s" */ { - int len = 0; - /* * Only report substitutions when: * - more than 'report' substitutions @@ -5177,23 +5175,19 @@ do_sub_msg(count_only) && messaging()) { if (got_int) - { STRCPY(msg_buf, _("(Interrupted) ")); - len = (int)STRLEN(msg_buf); - } if (sub_nsubs == 1) - vim_snprintf((char *)msg_buf + len, sizeof(msg_buf) - len, + vim_snprintf_add((char *)msg_buf, sizeof(msg_buf), "%s", count_only ? _("1 match") : _("1 substitution")); else - vim_snprintf((char *)msg_buf + len, sizeof(msg_buf) - len, + vim_snprintf_add((char *)msg_buf, sizeof(msg_buf), count_only ? _("%ld matches") : _("%ld substitutions"), sub_nsubs); - len = (int)STRLEN(msg_buf); if (sub_nlines == 1) - vim_snprintf((char *)msg_buf + len, sizeof(msg_buf) - len, + vim_snprintf_add((char *)msg_buf, sizeof(msg_buf), "%s", _(" on 1 line")); else - vim_snprintf((char *)msg_buf + len, sizeof(msg_buf) - len, + vim_snprintf_add((char *)msg_buf, sizeof(msg_buf), _(" on %ld lines"), (long)sub_nlines); if (msg(msg_buf)) /* save message to display it after redraw */ |