mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-26 06:39:43 +03:00
spelling: don't abort when a misspelled word isn't found, just note it
This fixes https://savannah.gnu.org/bugs/?48660 doubly, in case there are other ways in which 'spell' sees words differently from 'nano'.
This commit is contained in:
parent
20058a1b63
commit
14ac47517b
13
src/text.c
13
src/text.c
@ -2666,14 +2666,15 @@ bool do_int_spell_fix(const char *word)
|
|||||||
/* Find the first whole occurrence of word. */
|
/* Find the first whole occurrence of word. */
|
||||||
result = findnextstr(TRUE, NULL, 0, word, NULL);
|
result = findnextstr(TRUE, NULL, 0, word, NULL);
|
||||||
|
|
||||||
/* The word must exist; if not, something is wrong. */
|
/* If the word isn't found, alert the user; if it is, allow correction. */
|
||||||
if (result == 0)
|
if (result == 0) {
|
||||||
statusline(ALERT, "Internal error: "
|
statusline(ALERT, _("Unfindable word: %s"), word);
|
||||||
"speller listed unfindable word: %s", word);
|
lastmessage = HUSH;
|
||||||
else if (result == 1) {
|
proceed = TRUE;
|
||||||
|
napms(2800);
|
||||||
|
} else if (result == 1) {
|
||||||
exp_word = display_string(openfile->current->data, xplustabs(),
|
exp_word = display_string(openfile->current->data, xplustabs(),
|
||||||
strlenpt(word), FALSE);
|
strlenpt(word), FALSE);
|
||||||
|
|
||||||
edit_refresh();
|
edit_refresh();
|
||||||
|
|
||||||
spotlight(TRUE, exp_word);
|
spotlight(TRUE, exp_word);
|
||||||
|
Loading…
Reference in New Issue
Block a user