magiclines to the ends of files. Changes to read_file(),
write_marked_file(), move_to_filestruct(),
copy_from_filestruct(), usage(), do_output(), main(),
- do_replace_loop(), do_delete(), nano.1, nanorc.5, nano.texi,
- and nanorc.sample. (DLR, suggested by Jaime
+ do_replace_loop(), do_delete(), do_int_spell_fix(),
+ do_alt_speller(), nano.1, nanorc.5, nano.texi, and
+ nanorc.sample. (DLR, suggested by Jaime
<re2823@Safe-mail.net>)
- Move functions specific to the file browser to their own
source file, and adjust related variables accordingly. New
#ifndef NANO_SMALL
if (old_mark_set) {
/* If the mark is on, partition the filestruct so that it
- * contains only the marked text, keep track of whether the text
- * will have a magicline added when we're done correcting
- * misspelled words, and turn the mark off. */
+ * contains only the marked text; if the NO_NEWLINES flag isn't
+ * set, keep track of whether the text will have a magicline
+ * added when we're done correcting misspelled words; and
+ * turn the mark off. */
mark_order((const filestruct **)&top, &top_x,
(const filestruct **)&bot, &bot_x, &right_side_up);
filepart = partition_filestruct(top, top_x, bot, bot_x);
- added_magicline = (openfile->filebot->data[0] != '\0');
+ if (!ISSET(NO_NEWLINES))
+ added_magicline = (openfile->filebot->data[0] != '\0');
openfile->mark_set = FALSE;
}
#endif
#ifndef NANO_SMALL
if (old_mark_set) {
- /* If the mark was on and we added a magicline, remove it
- * now. */
- if (added_magicline)
+ /* If the mark was on, the NO_NEWLINES flag isn't set, and we
+ * added a magicline, remove it now. */
+ if (!ISSET(NO_NEWLINES) && added_magicline)
remove_magicline();
/* Put the beginning and the end of the mark at the beginning
#ifndef NANO_SMALL
if (old_mark_set) {
- /* If the mark was on, partition the filestruct so that it
- * contains only the marked text, and keep track of whether the
- * temp file (which should contain the spell-checked marked
- * text) will have a magicline added when it's reloaded. */
+ /* If the mark is on, partition the filestruct so that it
+ * contains only the marked text; if the NO_NEWLINES flag isn't
+ * set, keep track of whether the text will have a magicline
+ * added when we're done correcting misspelled words; and
+ * turn the mark off. */
mark_order((const filestruct **)&top, &top_x,
(const filestruct **)&bot, &bot_x, &right_side_up);
filepart = partition_filestruct(top, top_x, bot, bot_x);
- added_magicline = (openfile->filebot->data[0] != '\0');
+ if (!ISSET(NO_NEWLINES))
+ added_magicline = (openfile->filebot->data[0] != '\0');
/* Get the number of characters in the marked text, and subtract
* it from the saved value of totsize. */
if (old_mark_set) {
filestruct *top_save = openfile->fileage;
- /* If the mark was on and we added a magicline, remove it
- * now. */
- if (added_magicline)
+ /* If the mark was on, the NO_NEWLINES flag isn't set, and we
+ * added a magicline, remove it now. */
+ if (!ISSET(NO_NEWLINES) && added_magicline)
remove_magicline();
/* Put the beginning and the end of the mark at the beginning