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

 
 

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

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

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

Fixed in git, 433c7e5.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 20 Jun 2016 09:34:04 AM UTCbensOpen/ClosedOpen=>Closed
    Wed 04 May 2016 05:56:48 PM UTCbensStatusIn Progress=>Fixed
    Wed 04 May 2016 04:14:28 PM UTCbensStatusNone=>In Progress
      Assigned toNone=>bens

    Back to the top


    Powered by Savane 3.1-cleanup1