Allows external edit of non-existent files.
This commit is contained in:
Richard Kimberly Heck 2021-01-10 00:43:01 -05:00
parent ed2d3e199f
commit 50b99f810f

View File

@ -720,10 +720,9 @@ bool Formats::view(Buffer const & buffer, FileName const & filename,
bool Formats::edit(Buffer const & buffer, FileName const & filename,
string const & format_name) const
{
if (filename.empty() || !filename.exists()) {
Alert::error(_("Cannot edit file"),
bformat(_("File does not exist: %1$s"),
from_utf8(filename.absFileName())));
if (filename.empty()) {
Alert::error(_("No Filename"),
_("No filename was provided!"));
return false;
}