tweaks: delete a now-unused function
parent
20635b40f4
commit
9596f7de9d
34
src/files.c
34
src/files.c
|
@ -542,40 +542,6 @@ void replace_buffer(const char *filename, undo_type action, bool marked)
|
||||||
openfile->undotop->strdata = mallocstrcpy(NULL, _("spelling correction"));
|
openfile->undotop->strdata = mallocstrcpy(NULL, _("spelling correction"));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
|
||||||
/* Open the specified file, and if that succeeds, blow away the text of
|
|
||||||
* the current buffer covered by the mark and read the file
|
|
||||||
* contents into its place. */
|
|
||||||
void replace_marked_buffer(const char *filename)
|
|
||||||
{
|
|
||||||
FILE *f;
|
|
||||||
int descriptor;
|
|
||||||
linestruct *was_cutbuffer = cutbuffer;
|
|
||||||
|
|
||||||
descriptor = open_file(filename, FALSE, TRUE, &f);
|
|
||||||
|
|
||||||
if (descriptor < 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
add_undo(COUPLE_BEGIN);
|
|
||||||
openfile->undotop->strdata = mallocstrcpy(NULL, _("spelling correction"));
|
|
||||||
|
|
||||||
/* Throw away the text under the mark. */
|
|
||||||
cutbuffer = NULL;
|
|
||||||
add_undo(CUT);
|
|
||||||
do_cut_text(FALSE, TRUE, FALSE, FALSE);
|
|
||||||
update_undo(CUT);
|
|
||||||
free_lines(cutbuffer);
|
|
||||||
cutbuffer = was_cutbuffer;
|
|
||||||
|
|
||||||
/* Insert the processed file where the marked text was. */
|
|
||||||
read_file(f, descriptor, filename, TRUE);
|
|
||||||
|
|
||||||
add_undo(COUPLE_END);
|
|
||||||
openfile->undotop->strdata = mallocstrcpy(NULL, _("spelling correction"));
|
|
||||||
}
|
|
||||||
#endif /* !NANO_TINY */
|
|
||||||
#endif /* ENABLE_SPELLER */
|
#endif /* ENABLE_SPELLER */
|
||||||
|
|
||||||
/* Update the titlebar and the multiline cache to match the current buffer. */
|
/* Update the titlebar and the multiline cache to match the current buffer. */
|
||||||
|
|
|
@ -268,9 +268,6 @@ void set_modified(void);
|
||||||
bool open_buffer(const char *filename, bool new_buffer);
|
bool open_buffer(const char *filename, bool new_buffer);
|
||||||
#ifdef ENABLE_SPELLER
|
#ifdef ENABLE_SPELLER
|
||||||
void replace_buffer(const char *filename, undo_type action, bool marked);
|
void replace_buffer(const char *filename, undo_type action, bool marked);
|
||||||
#ifndef NANO_TINY
|
|
||||||
void replace_marked_buffer(const char *filename);
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
void prepare_for_display(void);
|
void prepare_for_display(void);
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifdef ENABLE_MULTIBUFFER
|
||||||
|
|
Loading…
Reference in New Issue