Renaming a variable, and adjusting whitespace after the previous change.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5782 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2016-03-31 11:27:16 +00:00
parent 5022e47940
commit 06ea93be3e
2 changed files with 19 additions and 19 deletions

View File

@ -1,6 +1,6 @@
2016-03-31 Benno Schulenberg <bensberg@justemail.net>
* src/text.c (do_int_spell_fix): Replace a fake 'while' and delete
a redundant 'if' -- we searched for whole words only, so it will be.
* src/text.c (do_int_spell_fix): Replace a fake 'while', delete a
redundant 'if', rename a variable, and adjust whitespace.
2016-03-30 Benno Schulenberg <bensberg@justemail.net>
* src/search.c (do_replace_loop, go_looking, findnextstr): Report

View File

@ -2359,8 +2359,8 @@ bool do_int_spell_fix(const char *word)
filestruct *edittop_save = openfile->edittop;
filestruct *current_save = openfile->current;
/* Save where we are. */
bool canceled = FALSE;
/* The inverse of this function's return value. */
bool proceed = TRUE;
/* The return value of this function. */
bool result;
/* The return value of searching for a misspelled word. */
unsigned stash[sizeof(flags) / sizeof(flags[0])];
@ -2432,31 +2432,31 @@ bool do_int_spell_fix(const char *word)
strnlenpt(openfile->current->data,
openfile->current_x + match_len) - xplustabs(), FALSE);
edit_refresh();
edit_refresh();
spotlight(TRUE, exp_word);
spotlight(TRUE, exp_word);
/* Let the user supply a correctly spelled alternative. */
canceled = (do_prompt(FALSE,
proceed = (do_prompt(FALSE,
#ifndef DISABLE_TABCOMP
TRUE,
TRUE,
#endif
MSPELL, word,
MSPELL, word,
#ifndef DISABLE_HISTORIES
NULL,
NULL,
#endif
edit_refresh, _("Edit a replacement")) == -1);
edit_refresh, _("Edit a replacement")) != -1);
spotlight(FALSE, exp_word);
spotlight(FALSE, exp_word);
free(exp_word);
free(exp_word);
/* If a replacement was given, go through all occurrences. */
if (!canceled && strcmp(word, answer) != 0) {
openfile->current_x--;
do_replace_loop(TRUE, openfile->current,
&openfile->current_x, word);
}
if (proceed && strcmp(word, answer) != 0) {
openfile->current_x--;
do_replace_loop(TRUE, openfile->current,
&openfile->current_x, word);
}
}
#ifndef NANO_TINY
@ -2497,7 +2497,7 @@ bool do_int_spell_fix(const char *word)
/* Restore the settings of the global flags. */
memcpy(flags, stash, sizeof(flags));
return !canceled;
return proceed;
}
/* Internal (integrated) spell checking using the spell program,