mirror of git://git.sv.gnu.org/nano.git
Avoiding a spell-check error when the marked region is zero bytes long.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5155 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
83ec9e7d50
commit
92142bed34
|
@ -1,3 +1,9 @@
|
|||
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.
|
||||
|
|
11
src/text.c
11
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(). */
|
||||
|
|
Loading…
Reference in New Issue