Making ^O work the same way as under Pico when option -t is given:
writing out the file immediately, without prompting. Patch by David Lawrence Ramsey. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5378 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
10
src/files.c
10
src/files.c
@@ -2225,7 +2225,7 @@ bool do_writeout(bool exiting)
|
||||
#endif
|
||||
bool retval = FALSE;
|
||||
|
||||
if (exiting && openfile->filename[0] != '\0' && ISSET(TEMP_FILE)) {
|
||||
if (openfile->filename[0] != '\0' && ISSET(TEMP_FILE)) {
|
||||
retval = write_file(openfile->filename, NULL, FALSE, OVERWRITE,
|
||||
FALSE);
|
||||
|
||||
@@ -2264,6 +2264,14 @@ bool do_writeout(bool exiting)
|
||||
(append == APPEND) ? _("File Name to Append to") :
|
||||
_("File Name to Write");
|
||||
|
||||
/* If we're not exiting, and the TEMP_FILE flag is set, and
|
||||
* the current file doesn't have a name, warn the user before
|
||||
* prompting for a name. If we are exiting, we've already
|
||||
* warned the user just before the "Save modified buffer"
|
||||
* prompt, so we don't need to do it again. */
|
||||
if (!exiting && openfile->filename[0] == '\0' && ISSET(TEMP_FILE))
|
||||
no_current_file_name_warning();
|
||||
|
||||
/* If we're using restricted mode, the filename isn't blank,
|
||||
* and we're at the "Write File" prompt, disable tab
|
||||
* completion. */
|
||||
|
||||
Reference in New Issue
Block a user