From: Chris Allegretta Date: Sun, 2 Dec 2001 06:03:22 +0000 (+0000) Subject: do_spell() - Dont prompt for replace if we don't change the word in question (Rocco... X-Git-Tag: v1.0.7~7 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=00b05e5b5d1a88741d9f9d4144b32c77f741a9c5;p=nano.git 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/branches/nano_1_0_branch/nano@917 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index a528862a..4e2ed06b 100644 --- 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 74e47376..36785f2d 100644 --- 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 */