diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-06-04 21:55:20 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-06-04 21:55:20 +0000 |
commit | 51485f06246966898f7c00e2e53b1ba4c6855cf7 (patch) | |
tree | c1cfe02ab088ea7a4423f15829e4083303d62a89 /src/buffer.c | |
parent | 4debb442bd885d182d7f77d1dfcdf143fd7cbf88 (diff) | |
download | vim-git-51485f06246966898f7c00e2e53b1ba4c6855cf7.tar.gz |
updated for version 7.0079
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/buffer.c b/src/buffer.c index 294bc9b16..c54df8817 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -854,11 +854,11 @@ do_bufdel(command, arg, addr_count, start_bnr, end_bnr, forceit) if (deleted == 0) { if (command == DOBUF_UNLOAD) - sprintf((char *)IObuff, _("E515: No buffers were unloaded")); + STRCPY(IObuff, _("E515: No buffers were unloaded")); else if (command == DOBUF_DEL) - sprintf((char *)IObuff, _("E516: No buffers were deleted")); + STRCPY(IObuff, _("E516: No buffers were deleted")); else - sprintf((char *)IObuff, _("E517: No buffers were wiped out")); + STRCPY(IObuff, _("E517: No buffers were wiped out")); errormsg = IObuff; } else if (deleted >= p_report) @@ -2450,7 +2450,7 @@ buflist_list(eap) else home_replace(buf, buf->b_fname, NameBuff, MAXPATHL, TRUE); - sprintf((char *)IObuff, "%3d%c%c%c%c%c \"", + vim_snprintf((char *)IObuff, IOSIZE - 20, "%3d%c%c%c%c%c \"%s\"", buf->b_fnum, buf->b_p_bl ? ' ' : 'u', buf == curbuf ? '%' : @@ -2459,18 +2459,11 @@ buflist_list(eap) (buf->b_nwindows == 0 ? 'h' : 'a'), !buf->b_p_ma ? '-' : (buf->b_p_ro ? '=' : ' '), (buf->b_flags & BF_READERR) ? 'x' - : (bufIsChanged(buf) ? '+' : ' ') - ); - - len = (int)STRLEN(IObuff); - STRNCPY(IObuff + len, NameBuff, IOSIZE - 20 - len); - IObuff[IOSIZE - 20 - len] = NUL; /* make sure it's terminated */ - - len = (int)STRLEN(IObuff); - IObuff[len++] = '"'; + : (bufIsChanged(buf) ? '+' : ' '), + NameBuff); /* put "line 999" in column 40 or after the file name */ - IObuff[len] = NUL; + len = STRLEN(IObuff); i = 40 - vim_strsize(IObuff); do { |