diff --git a/src/nano.c b/src/nano.c index 0ae82646..5c6ad0f7 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1428,11 +1428,13 @@ bool do_int_spell_fix(const char *word) bool case_sens_set = ISSET(CASE_SENSITIVE); #ifndef NANO_SMALL bool reverse_search_set = ISSET(REVERSE_SEARCH); - bool old_mark_set = ISSET(MARK_ISSET); #endif #ifdef HAVE_REGEX_H bool regexp_set = ISSET(USE_REGEXP); #endif +#ifndef NANO_SMALL + bool old_mark_set = ISSET(MARK_ISSET); +#endif /* Make sure spell-check is case sensitive. */ SET(CASE_SENSITIVE); @@ -1440,14 +1442,15 @@ bool do_int_spell_fix(const char *word) #ifndef NANO_SMALL /* Make sure spell-check goes forward only. */ UNSET(REVERSE_SEARCH); - - /* Make sure the marking highlight is off during spell-check. */ - UNSET(MARK_ISSET); #endif #ifdef HAVE_REGEX_H /* Make sure spell-check doesn't use regular expressions. */ UNSET(USE_REGEXP); #endif +#ifndef NANO_SMALL + /* Make sure the marking highlight is off during spell-check. */ + UNSET(MARK_ISSET); +#endif /* Save the current search/replace strings. */ search_init_globals(); @@ -1508,16 +1511,17 @@ bool do_int_spell_fix(const char *word) /* Restore search/replace direction. */ if (reverse_search_set) SET(REVERSE_SEARCH); - - /* Restore marking highlight. */ - if (old_mark_set) - SET(MARK_ISSET); #endif #ifdef HAVE_REGEX_H /* Restore regular expression usage setting. */ if (regexp_set) SET(USE_REGEXP); #endif +#ifndef NANO_SMALL + /* Restore marking highlight. */ + if (old_mark_set) + SET(MARK_ISSET); +#endif return accepted; }