Commit 55394076 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: set the correct flags just once for each spell-fixing session

No related merge requests found
Showing with 6 additions and 6 deletions
+6 -6
......@@ -2544,11 +2544,6 @@ bool fix_spello(const char *word)
size_t top_x, bot_x;
#endif
/* Do the spell checking case sensitive, forward, and without regexes. */
SET(CASE_SENSITIVE);
UNSET(BACKWARDS_SEARCH);
UNSET(USE_REGEXP);
/* Save the current search string, then set it to the misspelled word. */
save_search = last_search;
last_search = mallocstrcpy(NULL, word);
......@@ -2767,9 +2762,14 @@ const char *do_int_speller(const char *tempfile_name)
*read_buff_ptr = '\0';
close(uniq_fd[0]);
/* Process the spelling errors. */
/* Do any replacements case sensitive, forward, and without regexes. */
SET(CASE_SENSITIVE);
UNSET(BACKWARDS_SEARCH);
UNSET(USE_REGEXP);
read_buff_word = read_buff_ptr = read_buff;
/* Process each of the misspelled words. */
while (*read_buff_ptr != '\0') {
if ((*read_buff_ptr == '\r') || (*read_buff_ptr == '\n')) {
*read_buff_ptr = '\0';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment