- nano.c:do_int_spell_fix() - Temporarily unset REVERSE_SEARCH if it's set (Rocco Corsi)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1028 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
b2cd10d57c
commit
23b74b226e
|
@ -29,6 +29,8 @@ CVS code -
|
||||||
do_char()
|
do_char()
|
||||||
- Run edit_refresh() if ENABLE_COLOR is defined so adding
|
- Run edit_refresh() if ENABLE_COLOR is defined so adding
|
||||||
multi-liners will update (e.g. /* in C).
|
multi-liners will update (e.g. /* in C).
|
||||||
|
do_int_spell_fix()
|
||||||
|
- Temporarily unset REVERSE_SEARCH if it's set (Rocco Corsi).
|
||||||
do_suspend()
|
do_suspend()
|
||||||
- Call tcsetattr() to restore the old terminal settings, so
|
- Call tcsetattr() to restore the old terminal settings, so
|
||||||
tcsh can use ^C after suspend for example (fixes BUG #68).
|
tcsh can use ^C after suspend for example (fixes BUG #68).
|
||||||
|
|
10
nano.c
10
nano.c
|
@ -1448,12 +1448,16 @@ int do_int_spell_fix(char *word)
|
||||||
{
|
{
|
||||||
char *prevanswer = NULL, *save_search = NULL, *save_replace = NULL;
|
char *prevanswer = NULL, *save_search = NULL, *save_replace = NULL;
|
||||||
filestruct *begin;
|
filestruct *begin;
|
||||||
int i = 0, j = 0, beginx, beginx_top;
|
int i = 0, j = 0, beginx, beginx_top, reverse_search_set;
|
||||||
|
|
||||||
/* save where we are */
|
/* save where we are */
|
||||||
begin = current;
|
begin = current;
|
||||||
beginx = current_x + 1;
|
beginx = current_x + 1;
|
||||||
|
|
||||||
|
/* Make sure Spell Check goes forward only */
|
||||||
|
reverse_search_set = ISSET(REVERSE_SEARCH);
|
||||||
|
UNSET(REVERSE_SEARCH);
|
||||||
|
|
||||||
/* save the current search/replace strings */
|
/* save the current search/replace strings */
|
||||||
search_init_globals();
|
search_init_globals();
|
||||||
save_search = mallocstrcpy(save_search, last_search);
|
save_search = mallocstrcpy(save_search, last_search);
|
||||||
|
@ -1512,6 +1516,10 @@ int do_int_spell_fix(char *word)
|
||||||
current = begin;
|
current = begin;
|
||||||
current_x = beginx - 1;
|
current_x = beginx - 1;
|
||||||
|
|
||||||
|
/* restore Search/Replace direction */
|
||||||
|
if (reverse_search_set)
|
||||||
|
SET(REVERSE_SEARCH);
|
||||||
|
|
||||||
edit_update(current, CENTER);
|
edit_update(current, CENTER);
|
||||||
|
|
||||||
if (i == -1)
|
if (i == -1)
|
||||||
|
|
Loading…
Reference in New Issue