Commit e72db0e3 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

files: show newlines in filenames as ^J also in error messages

When a given file is, for example, unreadable or unwritable, the
error message should use ^J instead of ^@ in its name.
parent 87b2df6d
Showing with 5 additions and 2 deletions
+5 -2
......@@ -433,6 +433,9 @@ bool open_buffer(const char *filename, bool undoable)
assert(filename != NULL);
/* Display newlines in filenames as ^J. */
as_an_at = FALSE;
#ifndef DISABLE_OPERATINGDIR
if (check_operating_dir(filename, FALSE)) {
statusline(ALERT, _("Can't insert file from outside of %s"),
......@@ -1058,7 +1061,7 @@ void do_insertfile(void)
bool execute = FALSE, right_side_up = FALSE, single_line = FALSE;
#endif
/* Display embedded newlines as ^J. */
/* Display newlines in filenames as ^J. */
as_an_at = FALSE;
while (TRUE) {
......@@ -2181,7 +2184,7 @@ int do_writeout(bool exiting)
static bool did_credits = FALSE;
#endif
/* Display embedded newlines as ^J. */
/* Display newlines in filenames as ^J. */
as_an_at = FALSE;
if (exiting && ISSET(TEMP_FILE) && openfile->filename[0] != '\0') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment