tweaks: rename a function, to be more fitting
The file wasn't marked; a piece of text was marked, resulting in a region, and it is this region that gets written out to a file.
Этот коммит содержится в:
родитель
61b3aa6626
Коммит
fde86518ae
@ -2047,7 +2047,7 @@ bool write_file(const char *name, FILE *thefile, bool normal,
|
|||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
/* Write the marked region of the current buffer out to disk.
|
/* Write the marked region of the current buffer out to disk.
|
||||||
* Return TRUE on success and FALSE on error. */
|
* Return TRUE on success and FALSE on error. */
|
||||||
bool write_marked_file(const char *name, FILE *stream, bool normal,
|
bool write_region_to_file(const char *name, FILE *stream, bool normal,
|
||||||
kind_of_writing_type method)
|
kind_of_writing_type method)
|
||||||
{
|
{
|
||||||
linestruct *birthline, *topline, *botline, *stopper, *afterline;
|
linestruct *birthline, *topline, *botline, *stopper, *afterline;
|
||||||
@ -2324,7 +2324,7 @@ int do_writeout(bool exiting, bool withprompt)
|
|||||||
* the marked region; otherwise, write out the whole buffer. */
|
* the marked region; otherwise, write out the whole buffer. */
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
if (openfile->mark && withprompt && !exiting && !ISSET(RESTRICTED))
|
if (openfile->mark && withprompt && !exiting && !ISSET(RESTRICTED))
|
||||||
return write_marked_file(answer, NULL, NORMAL, method);
|
return write_region_to_file(answer, NULL, NORMAL, method);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
return write_file(answer, NULL, NORMAL, method, ANNOTATE);
|
return write_file(answer, NULL, NORMAL, method, ANNOTATE);
|
||||||
|
@ -294,10 +294,10 @@ bool outside_of_confinement(const char *currpath, bool allow_tabcomp);
|
|||||||
void init_backup_dir(void);
|
void init_backup_dir(void);
|
||||||
#endif
|
#endif
|
||||||
int copy_file(FILE *inn, FILE *out, bool close_out);
|
int copy_file(FILE *inn, FILE *out, bool close_out);
|
||||||
bool write_file(const char *name, FILE *thefile, bool tmp,
|
bool write_file(const char *name, FILE *thefile, bool normal,
|
||||||
kind_of_writing_type method, bool fullbuffer);
|
kind_of_writing_type method, bool annotate);
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
bool write_marked_file(const char *name, FILE *stream, bool tmp,
|
bool write_region_to_file(const char *name, FILE *stream, bool normal,
|
||||||
kind_of_writing_type method);
|
kind_of_writing_type method);
|
||||||
#endif
|
#endif
|
||||||
int do_writeout(bool exiting, bool withprompt);
|
int do_writeout(bool exiting, bool withprompt);
|
||||||
|
@ -2499,7 +2499,7 @@ void do_spell(void)
|
|||||||
|
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
if (openfile->mark)
|
if (openfile->mark)
|
||||||
okay = write_marked_file(temp_name, stream, TEMPORARY, OVERWRITE);
|
okay = write_region_to_file(temp_name, stream, TEMPORARY, OVERWRITE);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
okay = write_file(temp_name, stream, TEMPORARY, OVERWRITE, NONOTES);
|
okay = write_file(temp_name, stream, TEMPORARY, OVERWRITE, NONOTES);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user