aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 724d754ca7..fc7fabc009 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -99,7 +99,7 @@
static const char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name");
-void filemess(buf_T *buf, char *name, char *s, int attr)
+void filemess(buf_T *buf, char *name, char *s)
{
int prev_msg_col = msg_col;
@@ -129,7 +129,7 @@ void filemess(buf_T *buf, char *name, char *s, int attr)
msg_scroll = msg_scroll_save;
msg_scrolled_ign = true;
// may truncate the message to avoid a hit-return prompt
- msg_outtrans(msg_may_trunc(false, IObuff), attr);
+ msg_outtrans(msg_may_trunc(false, IObuff), 0, false);
msg_clr_eos();
ui_flush();
msg_scrolled_ign = false;
@@ -335,7 +335,7 @@ int readfile(char *fname, char *sfname, linenr_T from, linenr_T lines_to_skip,
// If the name is too long we might crash further on, quit here.
if (namelen >= MAXPATHL) {
- filemess(curbuf, fname, _("Illegal file name"), 0);
+ filemess(curbuf, fname, _("Illegal file name"));
msg_end();
msg_scroll = msg_save;
goto theend;
@@ -346,7 +346,7 @@ int readfile(char *fname, char *sfname, linenr_T from, linenr_T lines_to_skip,
// swap file may destroy it! Reported on MS-DOS and Win 95.
if (after_pathsep(fname, fname + namelen)) {
if (!silent) {
- filemess(curbuf, fname, _(msg_is_a_directory), 0);
+ filemess(curbuf, fname, _(msg_is_a_directory));
}
msg_end();
msg_scroll = msg_save;
@@ -374,11 +374,11 @@ int readfile(char *fname, char *sfname, linenr_T from, linenr_T lines_to_skip,
) {
if (S_ISDIR(perm)) {
if (!silent) {
- filemess(curbuf, fname, _(msg_is_a_directory), 0);
+ filemess(curbuf, fname, _(msg_is_a_directory));
}
retval = NOTDONE;
} else {
- filemess(curbuf, fname, _("is not a file"), 0);
+ filemess(curbuf, fname, _("is not a file"));
}
msg_end();
msg_scroll = msg_save;
@@ -467,9 +467,9 @@ int readfile(char *fname, char *sfname, linenr_T from, linenr_T lines_to_skip,
}
if (!silent) {
if (dir_of_file_exists(fname)) {
- filemess(curbuf, sfname, _("[New]"), 0);
+ filemess(curbuf, sfname, _("[New]"));
} else {
- filemess(curbuf, sfname, _("[New DIRECTORY]"), 0);
+ filemess(curbuf, sfname, _("[New DIRECTORY]"));
}
}
// Even though this is a new file, it might have been
@@ -497,10 +497,10 @@ int readfile(char *fname, char *sfname, linenr_T from, linenr_T lines_to_skip,
// open() does not set
// EOVERFLOW
(fd == -EOVERFLOW) ? _("[File too big]")
- : _("[Permission Denied]")), 0);
+ : _("[Permission Denied]")));
#else
filemess(curbuf, sfname, ((fd == UV_EFBIG) ? _("[File too big]")
- : _("[Permission Denied]")), 0);
+ : _("[Permission Denied]")));
#endif
curbuf->b_p_ro = true; // must use "w!" now
@@ -658,7 +658,7 @@ int readfile(char *fname, char *sfname, linenr_T from, linenr_T lines_to_skip,
if (!recoverymode && !filtering && !(flags & READ_DUMMY) && !silent) {
if (!read_stdin && !read_buffer) {
- filemess(curbuf, sfname, "", 0);
+ filemess(curbuf, sfname, "");
}
}
@@ -1685,7 +1685,7 @@ failed:
if (got_int) {
if (!(flags & READ_DUMMY)) {
- filemess(curbuf, sfname, _(e_interr), 0);
+ filemess(curbuf, sfname, _(e_interr));
if (newfile) {
curbuf->b_p_ro = true; // must use "w!" now
}
@@ -3035,9 +3035,9 @@ int buf_check_timestamp(buf_T *buf)
} else {
if (!autocmd_busy) {
msg_start();
- msg_puts_attr(tbuf, HL_ATTR(HLF_E) + MSG_HIST);
+ msg_puts_hl(tbuf, HLF_E, true);
if (*mesg2 != NUL) {
- msg_puts_attr(mesg2, HL_ATTR(HLF_W) + MSG_HIST);
+ msg_puts_hl(mesg2, HLF_W, true);
}
msg_clr_eos();
msg_end();