bugGNU nano - Bugs: bug #61175, [Wish] doing a full justification...

 
 

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

bug #61175: [Wish] doing a full justification should not move the cursor

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Fri 17 Sep 2021 07:39:51 AM UTC  
 
Severity:  1 - Wish Status:  None
Assigned to:  None Open/Closed:  Open

Fri 17 Sep 2021 07:39:51 AM UTC, original submission:  

When doing a full justification (M-J), the cursor is moved to the bottom of the buffer.  This serves no purpose, and needlessly causes the user to lose their current position in the file.  Also, I can imagine that the user would be quite interested in how the current part of the file would look /after/ the change: he/she would like to see the change happen.

When justifying a paragraph (^J), it makes sense to move the cursor to the end of the paragraph, so that with a series of ^Js several paragraphs can be justified in a row.  But with M-J this doesn't make sense: there is nothing further to justify.  So it would be much better to not move the cursor, to keep the current paragraph and current line centered as much as possible.  (And if the user really wants to go to the bottom of the buffer, it is just one keystroke away: Ctrl+End or M-/.)

Keeping the current line or paragraph centered might not be easy: if I'm not mistaken, justifying each paragraph results in all the linestructs getting replaced with new ones, so we can't just rejump to a linestruct.  And when many lines get rewrapped, the line numbers can change a lot too, so jumping to a line number will in general not keep us in the same spot either.  :|

Benno Schulenberg <bens>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (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.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.7