mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-10 19:42:40 +03:00
tweaks: remove an unneeded setting and unsetting of a flag
This twiddling was made superfluous by commit faa0eb99
from a year ago.
This commit is contained in:
parent
1e2e6733df
commit
1128a40d42
@ -547,7 +547,6 @@ void replace_marked_buffer(const char *filename)
|
|||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int descriptor;
|
int descriptor;
|
||||||
bool using_magicline = !ISSET(NO_NEWLINES);
|
|
||||||
linestruct *was_cutbuffer = cutbuffer;
|
linestruct *was_cutbuffer = cutbuffer;
|
||||||
|
|
||||||
descriptor = open_file(filename, FALSE, TRUE, &f);
|
descriptor = open_file(filename, FALSE, TRUE, &f);
|
||||||
@ -555,9 +554,6 @@ void replace_marked_buffer(const char *filename)
|
|||||||
if (descriptor < 0)
|
if (descriptor < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Don't add a magic line when replacing text in the buffer. */
|
|
||||||
SET(NO_NEWLINES);
|
|
||||||
|
|
||||||
add_undo(COUPLE_BEGIN);
|
add_undo(COUPLE_BEGIN);
|
||||||
openfile->undotop->strdata = mallocstrcpy(NULL, _("spelling correction"));
|
openfile->undotop->strdata = mallocstrcpy(NULL, _("spelling correction"));
|
||||||
|
|
||||||
@ -572,10 +568,6 @@ void replace_marked_buffer(const char *filename)
|
|||||||
/* Insert the processed file where the marked text was. */
|
/* Insert the processed file where the marked text was. */
|
||||||
read_file(f, descriptor, filename, TRUE);
|
read_file(f, descriptor, filename, TRUE);
|
||||||
|
|
||||||
/* Restore the magic-line behavior now that we're done fiddling. */
|
|
||||||
if (using_magicline)
|
|
||||||
UNSET(NO_NEWLINES);
|
|
||||||
|
|
||||||
add_undo(COUPLE_END);
|
add_undo(COUPLE_END);
|
||||||
openfile->undotop->strdata = mallocstrcpy(NULL, _("spelling correction"));
|
openfile->undotop->strdata = mallocstrcpy(NULL, _("spelling correction"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user