bugGNU nano - Bugs: bug #50415, after an external spell check, the...

 
 

bug #50415: after an external spell check, the cursor is not placed at end-of-line again

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Mon 27 Feb 2017 07:52:19 PM 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.

 

Wed 01 Mar 2017 10:05:09 AM UTC, comment #2:

Fixed in git, adf69a05.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 28 Feb 2017 07:06:32 PM UTC, comment #1:

If before starting a spellcheck the cursor is at the end of a line (current_x points at '\0'), then ensure that it points there again also afterward.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Mon 27 Feb 2017 07:52:19 PM UTC, original submission:

To reproduce, run: src/nano --ignore --speller="aspell -x -c -l en"

Then type the misspelled word "wondeful", without the quotes and without hitting Enter. Note that the cursor now sits after the "l". Then type ^T, and choose 1) to correct the misspelling. See that now the cursor sits on the "l". This is not right: if the word expands, and the cursor is on the same line as the corrected word, the cursor should adapt its position.

Of course: in general this is not possible, because when replacing the current buffer with the spell-corrected buffer, nano has no idea where in the buffer the spell program made any changes. But at least this one special case, which will occur quite often (the user typing ^T while while the cursor is at the end of a piece of text she has just typed), could be handled correctly: when the cursor sits at EOF when ^T is typed, put it again at EOF when the speller returns.

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
    Sun 02 Apr 2017 09:49:03 AM UTCbensOpen/ClosedOpen=>Closed
    Wed 01 Mar 2017 10:05:09 AM UTCbensStatusNone=>Fixed
    Tue 28 Feb 2017 07:06:32 PM UTCbensAssigned toNone=>bens
      Summaryafter an external spell check, the cursor position is not properly adjusted=>after an external spell check, the cursor is not placed at end-of-line again

    Back to the top


    Powered by Savane 3.1-cleanup1