diff options
author | Bram Moolenaar <Bram@vim.org> | 2009-05-13 10:51:08 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2009-05-13 10:51:08 +0000 |
commit | 0ab2a8870cc335acd99f7f4d806f802818d97014 (patch) | |
tree | 604a7a94f20947c47cb08fb013fb84c62b6e9ca9 /src/ops.c | |
parent | 3c65e314b432707440593d9ecf8d016b99e8ed8c (diff) | |
download | vim-git-0ab2a8870cc335acd99f7f4d806f802818d97014.tar.gz |
updated for version 7.2-168
Diffstat (limited to 'src/ops.c')
-rw-r--r-- | src/ops.c | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -6400,7 +6400,7 @@ cursor_pos_info() { getvcols(curwin, &min_pos, &max_pos, &min_pos.col, &max_pos.col); - sprintf((char *)buf1, _("%ld Cols; "), + vim_snprintf((char *)buf1, sizeof(buf1), _("%ld Cols; "), (long)(oparg.end_vcol - oparg.start_vcol + 1)); } else @@ -6408,13 +6408,15 @@ cursor_pos_info() if (char_count_cursor == byte_count_cursor && char_count == byte_count) - sprintf((char *)IObuff, _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Bytes"), + vim_snprintf((char *)IObuff, IOSIZE, + _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Bytes"), buf1, line_count_selected, (long)curbuf->b_ml.ml_line_count, word_count_cursor, word_count, byte_count_cursor, byte_count); else - sprintf((char *)IObuff, _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Chars; %ld of %ld Bytes"), + vim_snprintf((char *)IObuff, IOSIZE, + _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Chars; %ld of %ld Bytes"), buf1, line_count_selected, (long)curbuf->b_ml.ml_line_count, word_count_cursor, word_count, @@ -6426,20 +6428,22 @@ cursor_pos_info() { p = ml_get_curline(); validate_virtcol(); - col_print(buf1, (int)curwin->w_cursor.col + 1, + col_print(buf1, sizeof(buf1), (int)curwin->w_cursor.col + 1, (int)curwin->w_virtcol + 1); - col_print(buf2, (int)STRLEN(p), linetabsize(p)); + col_print(buf2, sizeof(buf2), (int)STRLEN(p), linetabsize(p)); if (char_count_cursor == byte_count_cursor && char_count == byte_count) - sprintf((char *)IObuff, _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Byte %ld of %ld"), + vim_snprintf((char *)IObuff, IOSIZE, + _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Byte %ld of %ld"), (char *)buf1, (char *)buf2, (long)curwin->w_cursor.lnum, (long)curbuf->b_ml.ml_line_count, word_count_cursor, word_count, byte_count_cursor, byte_count); else - sprintf((char *)IObuff, _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Char %ld of %ld; Byte %ld of %ld"), + vim_snprintf((char *)IObuff, IOSIZE, + _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Char %ld of %ld; Byte %ld of %ld"), (char *)buf1, (char *)buf2, (long)curwin->w_cursor.lnum, (long)curbuf->b_ml.ml_line_count, |