]> 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/branches/nano_1_0_branch/nano@917 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
nano.c

index a528862a654581b85504ca59b39b6f6f11a5e0ae..4e2ed06b6853d810ad859da640a888eae80fb7e8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@ CVS code -
 - po/de.po:
        - Updated German translation (Karl Eichwalder).
 - nano.c:
+  do_spell()
+       - Dont prompt for replace if we don't change the word in 
+         question (Rocco Corsi).
   main()
        - Added better Hurd support for function keys (Alt-V,U,9,@,F).
   signal_init()
diff --git a/nano.c b/nano.c
index 74e4737618123e7852d5f1ad11fcf890ffb163a7..36785f2ddff32744c3e5ef65cd770bfee5c2afc6 100644 (file)
--- a/nano.c
+++ b/nano.c
@@ -1314,8 +1314,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 */