Adding the command-line option --noread to treat any name
on the command line as a new file. Patch by Hans Alves. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4754 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
@@ -328,10 +328,10 @@ void open_buffer(const char *filename, bool undoable)
|
||||
if (new_buffer)
|
||||
make_new_buffer();
|
||||
|
||||
/* If the filename isn't blank, open the file. Otherwise, treat it
|
||||
* as a new file. */
|
||||
rc = (filename[0] != '\0') ? open_file(filename, new_buffer, &f) :
|
||||
-2;
|
||||
/* If the filename isn't blank, and we are not in NOREAD_MODE,
|
||||
* open the file. Otherwise, treat it as a new file. */
|
||||
rc = (filename[0] != '\0' && !ISSET(NOREAD_MODE)) ?
|
||||
open_file(filename, new_buffer, &f) : -2;
|
||||
|
||||
/* If we have a file, and we're loading into a new buffer, update
|
||||
* the filename. */
|
||||
|
||||
Reference in New Issue
Block a user