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.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 5d7ddb657a..7ff3e0ec6e 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -105,7 +105,7 @@ void filemess(buf_T *buf, char *name, char *s, int attr)
// For further ones overwrite the previous one, reset msg_scroll before
// calling filemess().
msg_scroll_save = msg_scroll;
- if (shortmess(SHM_OVERALL) && !exiting && p_verbose == 0) {
+ if (shortmess(SHM_OVERALL) && !msg_listdo_overwrite && !exiting && p_verbose == 0) {
msg_scroll = false;
}
if (!msg_scroll) { // wait a bit when overwriting an error msg
@@ -316,7 +316,7 @@ int readfile(char *fname, char *sfname, linenr_T from, linenr_T lines_to_skip,
}
}
- if ((shortmess(SHM_OVER) || curbuf->b_help) && p_verbose == 0) {
+ if (((shortmess(SHM_OVER) && !msg_listdo_overwrite) || curbuf->b_help) && p_verbose == 0) {
msg_scroll = false; // overwrite previous file message
} else {
msg_scroll = true; // don't overwrite previous file message
@@ -459,7 +459,7 @@ 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_file_message(), 0);
+ filemess(curbuf, sfname, _("[New]"), 0);
} else {
filemess(curbuf, sfname, _("[New DIRECTORY]"), 0);
}
@@ -1718,7 +1718,7 @@ failed:
c = true;
}
if (read_no_eol_lnum) {
- msg_add_eol();
+ xstrlcat(IObuff, _("[noeol]"), IOSIZE);
c = true;
}
if (ff_error == EOL_DOS) {
@@ -2064,11 +2064,6 @@ static void check_marks_read(void)
curbuf->b_marks_read = true;
}
-char *new_file_message(void)
-{
- return shortmess(SHM_NEW) ? _("[New]") : _("[New File]");
-}
-
/// Set the name of the current buffer. Use when the buffer doesn't have a
/// name and a ":r" or ":w" command with a file name is used.
int set_rw_fname(char *fname, char *sfname)
@@ -2142,17 +2137,17 @@ bool msg_add_fileformat(int eol_type)
{
#ifndef USE_CRNL
if (eol_type == EOL_DOS) {
- xstrlcat(IObuff, shortmess(SHM_TEXT) ? _("[dos]") : _("[dos format]"), IOSIZE);
+ xstrlcat(IObuff, _("[dos]"), IOSIZE);
return true;
}
#endif
if (eol_type == EOL_MAC) {
- xstrlcat(IObuff, shortmess(SHM_TEXT) ? _("[mac]") : _("[mac format]"), IOSIZE);
+ xstrlcat(IObuff, _("[mac]"), IOSIZE);
return true;
}
#ifdef USE_CRNL
if (eol_type == EOL_UNIX) {
- xstrlcat(IObuff, shortmess(SHM_TEXT) ? _("[unix]") : _("[unix format]"), IOSIZE);
+ xstrlcat(IObuff, _("[unix]"), IOSIZE);
return true;
}
#endif
@@ -2181,12 +2176,6 @@ void msg_add_lines(int insert_space, long lnum, off_T nchars)
}
}
-/// Append message for missing line separator to IObuff.
-void msg_add_eol(void)
-{
- xstrlcat(IObuff, shortmess(SHM_LAST) ? _("[noeol]") : _("[Incomplete last line]"), IOSIZE);
-}
-
bool time_differs(const FileInfo *file_info, long mtime, long mtime_ns) FUNC_ATTR_CONST
{
#if defined(__linux__) || defined(MSWIN)