]> git.wh0rd.org Git - nano.git/commitdiff
do_spell() - Dont prompt for replace if we don't change the word in question (Rocco...
authorChris Allegretta <chrisa@asty.org>
Sun, 2 Dec 2001 06:03:22 +0000 (06:03 +0000)
committerChris Allegretta <chrisa@asty.org>
Sun, 2 Dec 2001 06:03:22 +0000 (06:03 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@917 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
nano.c

index 1a11b7708366ca6f79896ac0027bfe9ea9170063..f47eee5f616c36fc2c1a53c48f243f7dcd5ec70c 100644 (file)
--- 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 d34536531f4c5446778f9279ec9be25db5d2937e..6bd1e2c85df1d9575ac19b8f49ffa9b1c45be31f 100644 (file)
--- 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 */