diff --git a/ChangeLog b/ChangeLog index 208fb91c..54af3501 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-03-23 Benno Schulenberg + * 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 * src/text.c (do_alt_speller): timestamp can just be a __time_t. Fixes compilation on win32. diff --git a/src/text.c b/src/text.c index 4495c467..816f7616 100644 --- a/src/text.c +++ b/src/text.c @@ -2692,15 +2692,14 @@ const char *do_alt_speller(char *tempfile_name) } #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(). */