bugGNU nano - Bugs: bug #45573, the internal spell fixer does not...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #45573: the internal spell fixer does not properly compensate for changed length

Submitter:  Benno Schulenberg <bens>
Submitted:  Sat 18 Jul 2015 11:17:10 AM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Wed 04 May 2016 05:56:48 PM UTC, comment #3: 

Fixed in git, 433c7e5.

Benno Schulenberg <bens>
Group administrator
Tue 03 May 2016 12:10:53 PM UTC, comment #2: 

Oh, to add: the bug is old -- it exists since at least nano-2.2.1.

Benno Schulenberg <bens>
Group administrator
Tue 03 May 2016 11:57:35 AM UTC, comment #1: 

Let's reduce this bug to just the first one.  (The second one has changed in behavior now and has been rereported in a more severe form as bug #47836.)

To reproduce the first bug, run 'src/nano +9 README'.  Then type:  M-A  M-G  10,41  <Enter>.  Notice how the cursor is on the first "a" of "and has unclear".  Now type ^T and replace "GPL" with "GPLxxx" and say 'All'.  Notice how now the cursor is on the first "e" of "license" -- an uncompensated six positions to the left.

Expected behavior: the cursor should stay put on "and".

Benno Schulenberg <bens>
Group administrator
Sat 18 Jul 2015 11:17:10 AM UTC, original submission:  

When spell correcting a marked region while using the internal spell checking mechanism, and making spelling corrections on the last line of the region that change the length of the corrected words, then the end point of the region is not adjusted for these changes in length.

Also, when the marked region covers only a portion of a single line (and does not start at column 1), then the marked region will be extended on the right by the number of characters before its left.  This seems to be the compensating code of do_replace_loop() kicking in when it shouldn't.

It seems that, when spell checking, the compensating code should work exactly the other way around.

Benno Schulenberg <bens>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-06-20 bens Open/ClosedOpen Closed
    2016-05-04 bens StatusIn Progress Fixed
    2016-05-04 bens StatusNone In Progress
        Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code