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

 
 

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

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

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

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>
Group 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>
Group 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>
Group Member
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>
Group Member

 

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

 

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)
  •  

    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
    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.13-758e.
    Corresponding source code