mirror of git://git.sv.gnu.org/nano.git
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
This commit is contained in:
parent
5022e47940
commit
06ea93be3e
|
@ -1,6 +1,6 @@
|
||||||
2016-03-31 Benno Schulenberg <bensberg@justemail.net>
|
2016-03-31 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/text.c (do_int_spell_fix): Replace a fake 'while' and delete
|
* src/text.c (do_int_spell_fix): Replace a fake 'while', delete a
|
||||||
a redundant 'if' -- we searched for whole words only, so it will be.
|
redundant 'if', rename a variable, and adjust whitespace.
|
||||||
|
|
||||||
2016-03-30 Benno Schulenberg <bensberg@justemail.net>
|
2016-03-30 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/search.c (do_replace_loop, go_looking, findnextstr): Report
|
* src/search.c (do_replace_loop, go_looking, findnextstr): Report
|
||||||
|
|
34
src/text.c
34
src/text.c
|
@ -2359,8 +2359,8 @@ bool do_int_spell_fix(const char *word)
|
||||||
filestruct *edittop_save = openfile->edittop;
|
filestruct *edittop_save = openfile->edittop;
|
||||||
filestruct *current_save = openfile->current;
|
filestruct *current_save = openfile->current;
|
||||||
/* Save where we are. */
|
/* Save where we are. */
|
||||||
bool canceled = FALSE;
|
bool proceed = TRUE;
|
||||||
/* The inverse of this function's return value. */
|
/* The return value of this function. */
|
||||||
bool result;
|
bool result;
|
||||||
/* The return value of searching for a misspelled word. */
|
/* The return value of searching for a misspelled word. */
|
||||||
unsigned stash[sizeof(flags) / sizeof(flags[0])];
|
unsigned stash[sizeof(flags) / sizeof(flags[0])];
|
||||||
|
@ -2432,31 +2432,31 @@ bool do_int_spell_fix(const char *word)
|
||||||
strnlenpt(openfile->current->data,
|
strnlenpt(openfile->current->data,
|
||||||
openfile->current_x + match_len) - xplustabs(), FALSE);
|
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. */
|
/* Let the user supply a correctly spelled alternative. */
|
||||||
canceled = (do_prompt(FALSE,
|
proceed = (do_prompt(FALSE,
|
||||||
#ifndef DISABLE_TABCOMP
|
#ifndef DISABLE_TABCOMP
|
||||||
TRUE,
|
TRUE,
|
||||||
#endif
|
#endif
|
||||||
MSPELL, word,
|
MSPELL, word,
|
||||||
#ifndef DISABLE_HISTORIES
|
#ifndef DISABLE_HISTORIES
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
#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 a replacement was given, go through all occurrences. */
|
||||||
if (!canceled && strcmp(word, answer) != 0) {
|
if (proceed && strcmp(word, answer) != 0) {
|
||||||
openfile->current_x--;
|
openfile->current_x--;
|
||||||
do_replace_loop(TRUE, openfile->current,
|
do_replace_loop(TRUE, openfile->current,
|
||||||
&openfile->current_x, word);
|
&openfile->current_x, word);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
|
@ -2497,7 +2497,7 @@ bool do_int_spell_fix(const char *word)
|
||||||
/* Restore the settings of the global flags. */
|
/* Restore the settings of the global flags. */
|
||||||
memcpy(flags, stash, sizeof(flags));
|
memcpy(flags, stash, sizeof(flags));
|
||||||
|
|
||||||
return !canceled;
|
return proceed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Internal (integrated) spell checking using the spell program,
|
/* Internal (integrated) spell checking using the spell program,
|
||||||
|
|
Loading…
Reference in New Issue