From 80838270882029767f553e3eaf4146aaa4e608f5 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Sun, 2 Dec 2001 06:03:22 +0000 Subject: [PATCH] do_spell() - Dont prompt for replace if we don't change the word in question (Rocco Corsi). git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@917 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ nano.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a11b770..f47eee5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,9 @@ CVS Code - position (David Lawrence Ramsey). do_wrap() - Many fixes (David Lawrence Ramsey). + do_spell() + - Dont prompt for replace if we don't change the word in + question (Rocco Corsi). - po/de.po: - German translation updates (Karl Eichwalder). - po/ru.po: diff --git a/nano.c b/nano.c index d3453653..6bd1e2c8 100644 --- a/nano.c +++ b/nano.c @@ -1482,8 +1482,10 @@ int do_int_spell_fix(char *word) search_last_line = FALSE; - j = i; - do_replace_loop(prevanswer, fileage, &beginx_top, TRUE, &j); + if (strcmp(prevanswer,answer) != 0) { + j = i; + do_replace_loop(prevanswer, fileage, &beginx_top, TRUE, &j); + } } /* restore the search/replace strings */ -- 2.39.5