Making ^O always prompt for a filename, also when --tempfile is given.
Users who want an immediate save, can bind the function 'savefile'. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5489 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
5d27910d6d
commit
cac3c3399f
|
@ -1,5 +1,9 @@
|
|||
2015-12-07 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/winio.c (edit_draw): Quit the loop when there is no end match.
|
||||
* src/files.c (do_writeout): When --tempfile is given, make ^O not
|
||||
write out the file rightaway, as otherwise there is no way to discard
|
||||
the edits. This undoes the core part of r5378 of September 29. See
|
||||
https://lists.gnu.org/archive/html/help-nano/2015-11/msg00005.html.
|
||||
|
||||
GNU nano 2.5.0 - 2015.12.05
|
||||
|
||||
|
@ -206,7 +210,7 @@ GNU nano 2.4.3 - 2015.11.18
|
|||
do_exit): When option -t is given, make ^O work the same way as under
|
||||
Pico, writing out the file without prompting. And make it work even
|
||||
better than Pico when the current file doesn't have a name yet. This
|
||||
fixes Savannah bug #45415.
|
||||
fixes Savannah bug #45415. [Reverted in r5489 on December 7.]
|
||||
|
||||
2015-10-28 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/text.c (do_redo): For an INSERT, 'u->mark_begin_lineno' is not
|
||||
|
|
10
src/files.c
10
src/files.c
|
@ -2236,7 +2236,7 @@ bool do_writeout(bool exiting)
|
|||
#endif
|
||||
bool retval = FALSE;
|
||||
|
||||
if (openfile->filename[0] != '\0' && ISSET(TEMP_FILE)) {
|
||||
if (exiting && openfile->filename[0] != '\0' && ISSET(TEMP_FILE)) {
|
||||
retval = write_file(openfile->filename, NULL, FALSE, OVERWRITE,
|
||||
FALSE);
|
||||
|
||||
|
@ -2275,14 +2275,6 @@ 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. */
|
||||
|
|
Loading…
Reference in New Issue