Adding a new bindable function that writes a file to disk without
first asking for its name. Patch was suggested by Seiya Nuta. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5318 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
11
src/files.c
11
src/files.c
@@ -2459,6 +2459,17 @@ void do_writeout_void(void)
|
||||
display_main_list();
|
||||
}
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* If it has a name, write the current file to disk without prompting. */
|
||||
void do_savefile(void)
|
||||
{
|
||||
if (openfile->filename[0] != '\0')
|
||||
write_file(openfile->filename, NULL, FALSE, OVERWRITE, FALSE);
|
||||
else
|
||||
do_writeout_void();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Return a malloc()ed string containing the actual directory, used to
|
||||
* convert ~user/ and ~/ notation. */
|
||||
char *real_dir_from_tilde(const char *buf)
|
||||
|
||||
Reference in New Issue
Block a user