+2015-03-23 Benno Schulenberg <bensberg@justemail.net>
+ * src/text.c (do_alt_speller): Avoid the spell checker reporting
+ 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.
+
2015-03-22 Chris Allegretta <chrisa@asty.org>
* src/text.c (do_alt_speller): timestamp can just be a __time_t.
Fixes compilation on win32.
}
#endif
- if (openfile->totsize == 0) {
- statusbar(_("Finished checking spelling"));
- return NULL;
- }
-
- /* Get the timestamp of the temporary file. */
+ /* Get the timestamp and the size of the temporary file. */
stat(tempfile_name, &spellfileinfo);
timestamp = spellfileinfo.st_mtime;
+ /* If the number of bytes to check is zero, get out. */
+ if (spellfileinfo.st_size == 0)
+ return NULL;
+
endwin();
/* Set up an argument list to pass execvp(). */