From a800b42975f7a62282cb90d8c61ef3cff2fe810a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 27 Jun 2010 01:15:55 +0200 Subject: Add file save counter to undo information. Add undotree() function. --- src/workshop.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/workshop.c') diff --git a/src/workshop.c b/src/workshop.c index 334e6afff..c9c52954d 100644 --- a/src/workshop.c +++ b/src/workshop.c @@ -820,7 +820,6 @@ workshop_toolbar_button( char namebuf[BUFSIZ]; static int tbid = 1; char_u *p; - int len; #ifdef WSDEBUG_TRACE if (WSDLEVEL(WS_TRACE_VERBOSE)) @@ -861,12 +860,10 @@ workshop_toolbar_button( if (file != NULL && *file != NUL) { p = vim_strsave_escaped((char_u *)file, (char_u *)" "); - len = STRLEN(cbuf); - vim_snprintf(cbuf + len, sizeof(cbuf) - len, "icon=%s ", p); + vim_snprintf_add(cbuf, sizeof(cbuf), "icon=%s ", p); vim_free(p); } - len = STRLEN(cbuf); - vim_snprintf(cbuf + len, sizeof(cbuf) - len,"1.%d %s :wsverb %s", + vim_snprintf_add(cbuf, sizeof(cbuf),"1.%d %s :wsverb %s", tbpri, namebuf, verb); /* Define the menu item */ -- cgit v1.2.1