nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] Internal Spell Check bug in 1.2 and 1.3


From: Rocco Corsi
Subject: [Nano-devel] Internal Spell Check bug in 1.2 and 1.3
Date: Mon, 25 Oct 2004 22:50:01 -0400

Hello

   A bug in the internal spell checker found.  Patch is attached,
hopefully I have sent it with the proper diff output! Its been a long
since my last contribution, so please point out what I am doing wrong.

   Problem is that if the cursor is in the middle of a file, spell check
will usually only correct the incorrect word instances that appear
before the position of the cursor.  It will stop at the original cursor
start.

   This problem does not occur if the first instance of the incorrect
word is after the current location of the cursor.  If the cursor is at
the top of the file, this bug will not reveal itself.

   Something to remember about the internal spell checker, no matter
where the current cursor is located, the spell checker will start from
the top.  So a search/replace session goes from the top to the bottom of
file.

   Bug appears to have been introduced around 1.1.99pre2.  It looks like
it is in the 1.2 series also.

   How to reproduce.

1) Create a file line this

this is an errorr
this is an errorr
this is an errorr
this is an errorr


2) position cursor on third line
3) CTRL-T
4) "Edit a replacement:" error
5) keep responding NO to "Replace this instance?". I guess you could
also respond YES if you want.
6) it will go through the first two and never prompt for the third and
forth.
   

diff -c -r1.177 nano.c
*** nano/src/nano.c     24 Oct 2004 17:20:31 -0000      1.177
--- nano/src/nano.c     26 Oct 2004 02:33:58 -0000
***************
*** 1487,1493 ****

            if (accepted && strcmp(word, answer) != 0) {
                current_x--;
!               do_replace_loop(word, current_save, &current_x_save,
TRUE);
            }

            break;
--- 1487,1493 ----

            if (accepted && strcmp(word, answer) != 0) {
                current_x--;
!               do_replace_loop(word, current, &current_x, TRUE);
            }

            break;






reply via email to

[Prev in Thread] Current Thread [Next in Thread]