bugGNU nano - Bugs: bug #47834, cursor position is not preserved...

 
 

bug #47834: cursor position is not preserved when doing internal spell fixing

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Tue 03 May 2016 11:03:51 AM UTC  
 
Severity: 2 - MinorStatus: 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.

 

Tue 03 May 2016 11:30:58 AM UTC, comment #2:

Fixed in git, 937c478.

This also fixes a secondary bug: when respelling "GPL" into a much longer word (say, "GPLxxxyyy"), it would not see and thus not replace the second occurrence of "GPL" -- why exactly is too confusing to understand, but never mind, it is fixed.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 03 May 2016 11:10:11 AM UTC, comment #1:

Ehm, that should have been 'src/nano +10,17 README'.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 03 May 2016 11:03:51 AM UTC, original submission:

When using the internal spell fixer and fixing misspellings on the line where the cursor is when the speller is invoked, and when the fixes change the length of the words, then the relative cursor position is not maintained.

To reproduce, run 'src/nano +9,17 README'. See the cursor is on the "a" before "GPL-friendly". Then type ^T to run the internal spell checker (don't have one set in your .nanorc). Ignore "cd" and "devel", and then change "GPL" to "GPLxxx" and answer Yes twice, then press ^C to cut the spell-fixing session short. Now see that the cursor is on the "or" before "a GPL-friendly".

Expected behavior: the cursor should stay on the word and letter it was on before the spell fixing started, just like with normal replacing.

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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 20 Jun 2016 10:01:02 AM UTCbensOpen/ClosedOpen=>Closed
    Tue 03 May 2016 11:30:58 AM UTCbensStatusNone=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1