an error when the marked region is zero bytes long. The message
is not needed -- it gets printed by the caller. This generalizes
the fix for Savannah bug #29393.
+ * src/text.c (do_alt_speller): Do not unset the mark before the
+ possible bailout because of a zero-sized region.
2015-03-22 Chris Allegretta <chrisa@asty.org>
* src/text.c (do_alt_speller): timestamp can just be a __time_t.
size_t totsize_save = openfile->totsize;
/* Our saved value of totsize, used when we spell-check a marked
* selection. */
-
- if (old_mark_set) {
- /* If the mark is on, save the number of the line it starts on,
- * and then turn the mark off. */
- mb_lineno_save = openfile->mark_begin->lineno;
- openfile->mark_set = FALSE;
- }
#endif
/* Get the timestamp and the size of the temporary file. */
if (spellfileinfo.st_size == 0)
return NULL;
+#ifndef NANO_TINY
+ if (old_mark_set) {
+ /* If the mark is on, save the number of the line it starts on,
+ * and then turn the mark off. */
+ mb_lineno_save = openfile->mark_begin->lineno;
+ openfile->mark_set = FALSE;
+ }
+#endif
+
endwin();
/* Set up an argument list to pass execvp(). */