aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2021-10-23 16:04:37 -0400
committerJames McCoy <jamessan@jamessan.com>2021-11-01 06:41:29 -0400
commite6ff154be6da8bd53b604fb6e38686acae75b24f (patch)
tree8424fa376151d9eabfe5a23c54f19ec4e22ba7ea /src/nvim/buffer.c
parentefa924f66b183d9cf2404ce91c4f009c27e0515a (diff)
downloadrneovim-e6ff154be6da8bd53b604fb6e38686acae75b24f.tar.gz
rneovim-e6ff154be6da8bd53b604fb6e38686acae75b24f.tar.bz2
rneovim-e6ff154be6da8bd53b604fb6e38686acae75b24f.zip
vim-patch:8.1.0779: argument for message functions is inconsistent
Problem: Argument for message functions is inconsistent. Solution: Make first argument to msg() "char *". https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index db436c0afc..4692f9e722 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -918,7 +918,7 @@ void handle_swap_exists(bufref_T *old_curbuf)
// User selected Recover at ATTENTION prompt.
msg_scroll = true;
ml_recover(false);
- MSG_PUTS("\n"); // don't overwrite the last message
+ msg_puts("\n"); // don't overwrite the last message
cmdline_row = msg_row;
do_modelines(0);
@@ -3039,14 +3039,14 @@ void fileinfo(int fullname, int shorthelp, int dont_truncate)
{
char_u *name;
int n;
- char_u *p;
- char_u *buffer;
+ char *p;
+ char *buffer;
size_t len;
buffer = xmalloc(IOSIZE);
if (fullname > 1) { // 2 CTRL-G: include buffer number
- vim_snprintf((char *)buffer, IOSIZE, "buf %d: ", curbuf->b_fnum);
+ vim_snprintf(buffer, IOSIZE, "buf %d: ", curbuf->b_fnum);
p = buffer + STRLEN(buffer);
} else {
p = buffer;
@@ -3061,12 +3061,12 @@ void fileinfo(int fullname, int shorthelp, int dont_truncate)
} else {
name = curbuf->b_ffname;
}
- home_replace(shorthelp ? curbuf : NULL, name, p,
+ home_replace(shorthelp ? curbuf : NULL, name, (char_u *)p,
(size_t)(IOSIZE - (p - buffer)), true);
}
bool dontwrite = bt_dontwrite(curbuf);
- vim_snprintf_add((char *)buffer, IOSIZE, "\"%s%s%s%s%s%s",
+ vim_snprintf_add(buffer, IOSIZE, "\"%s%s%s%s%s%s",
curbufIsChanged()
? (shortmess(SHM_MOD) ? " [+]" : _(" [Modified]")) : " ",
(curbuf->b_flags & BF_NOTEDITED) && !dontwrite
@@ -3091,27 +3091,27 @@ void fileinfo(int fullname, int shorthelp, int dont_truncate)
(long)curbuf->b_ml.ml_line_count);
}
if (curbuf->b_ml.ml_flags & ML_EMPTY) {
- vim_snprintf_add((char *)buffer, IOSIZE, "%s", _(no_lines_msg));
+ vim_snprintf_add(buffer, IOSIZE, "%s", _(no_lines_msg));
} else if (p_ru) {
// Current line and column are already on the screen -- webb
- vim_snprintf_add((char *)buffer, IOSIZE,
+ vim_snprintf_add(buffer, IOSIZE,
NGETTEXT("%" PRId64 " line --%d%%--",
"%" PRId64 " lines --%d%%--",
(unsigned long)curbuf->b_ml.ml_line_count),
(int64_t)curbuf->b_ml.ml_line_count, n);
} else {
- vim_snprintf_add((char *)buffer, IOSIZE,
+ vim_snprintf_add(buffer, IOSIZE,
_("line %" PRId64 " of %" PRId64 " --%d%%-- col "),
(int64_t)curwin->w_cursor.lnum,
(int64_t)curbuf->b_ml.ml_line_count,
n);
validate_virtcol();
len = STRLEN(buffer);
- col_print(buffer + len, IOSIZE - len,
+ col_print((char_u *)buffer + len, IOSIZE - len,
(int)curwin->w_cursor.col + 1, (int)curwin->w_virtcol + 1);
}
- (void)append_arg_number(curwin, buffer, IOSIZE, !shortmess(SHM_FILE));
+ (void)append_arg_number(curwin, (char_u *)buffer, IOSIZE, !shortmess(SHM_FILE));
if (dont_truncate) {
// Temporarily set msg_scroll to avoid the message being truncated.
@@ -3129,7 +3129,7 @@ void fileinfo(int fullname, int shorthelp, int dont_truncate)
// before redrawing).
// - When the screen was scrolled but there is no wait-return
// prompt.
- set_keep_msg(p, 0);
+ set_keep_msg((char_u *)p, 0);
}
}