bugGNU nano - Bugs: bug #52042, smarthome forgets col position...

 
 

bug #52042: smarthome forgets col position when moving up/down lines

Submitted by:  Mike Frysinger <vapier>
Submitted on:  Fri 15 Sep 2017 04:50:37 PM UTC  
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  David Lawrence Ramsey <dolorous> Open/Closed:  Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 15 Sep 2017 08:22:06 PM UTC, comment #3:

thanks, master works for me again

i use this a lot when programming as it's a quick method to get to the start of the line where the code lives :)

Mike Frysinger <vapier>
Project Member
Fri 15 Sep 2017 07:31:28 PM UTC, comment #2:

Thanks for the report. And thanks for the fix.
Pushed to master: 5f70229c.

Benno Schulenberg <bens>
Project Administrator
Fri 15 Sep 2017 06:47:02 PM UTC, comment #1:

The attached patch (against git c8363a0) should fix it.

The problem is do_home() optimizes a bit too much in the case of a smart home. In every case where we could have moved to a different chunk, placewewant is set to zero. However, if we do a smart home, that's the one exception: placewewant should be set to the column where the indent ends. The patch makes nano use xplustabs(), which sets placewewant to the proper column in all of these cases.

(file #41813)

David Lawrence Ramsey <dolorous>
Project AdministratorIn charge of this item.
Fri 15 Sep 2017 04:50:37 PM UTC, original submission:

after commit 9f2c80db24d96b46283387c49030edbf744f7828 (moving: when determining where we are on the screen, use placewewant), smarthome no longer works correctly

to reproduce:
- printf '\t%s\n' a b c > file
- run `nano -I -A file`
- hit <home> to move cursor to "a"
- hit <down arrow> to move cursor down a line

before that commit, the cursor would move to "b". after that commit, the cursor is incorrectly reset to col 0.

Mike Frysinger <vapier>
Project Member

 

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

Attach Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by dolorous (Updated the item)
  • -email is unavailable- added by vapier (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-11-19 bens Open/ClosedOpen => Closed
    2017-09-15 bens StatusNone => Fixed
        Assigned toNone => dolorous
    2017-09-15 dolorous Attached File- => Added 0001-moving-set-placewewant-properly-again-when-doing-a-s.patch, #41813

    Back to the top


    Powered by Savane 3.3