bugGNU nano - Bugs: bug #65992, Alt+Home/Alt+End while the mark is...

 
 

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

bug #65992: Alt+Home/Alt+End while the mark is on does not highlight the selection

Submitter:  Tasos Papastylianou <tpapastylianou>
Submitted:  Mon 15 Jul 2024 10:48:49 AM UTC
   
 
Severity:  4 - Important Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Fri 06 Sep 2024 07:38:38 AM UTC, comment #4: 

The fix was released in nano-8.2.  Thanks again for reporting.

Benno Schulenberg <bens>
Group administrator
Mon 22 Jul 2024 03:04:14 PM UTC, comment #3: 

Btw, thought I'd mention in case it's a useful insight, the reason I don't use Shift+up/left/down/right in nano, is because it conflicts with byobu (an excellent tmux wrapper/clone) incredibly useful shortcuts. Shift+arrows are the default shortcuts for navigating/switching between panes. (same with Alt+Shift+arrows, for resizing panes).

And the reason I don't use Ctrl+arrows or Ctrl+Shift+arrows is because they conflict with my default terminal's (guake) shortcuts for resizing the terminal window itself, and changing opacity respectively.

So I rely exclusively on mark-setting + search/motions for highlighting instead. Since arrow shortcuts are so commonly bound by other 'apps', I suspect there's probably a non-trivial portion of nano users who also rely on mark-setting the same way.

Tasos Papastylianou <tpapastylianou>
Thu 18 Jul 2024 08:55:41 AM UTC, comment #2: 

Fixed in git, commit 4b03cc60, by making sure edit_refresh() is called after `toprow`/`bottomrow` when the mark is on.

(The bug could occur because personally I never use the mark any more -- I would use Ctrl+Shift+Up/Down to select the rough area, and then Shift+Up/Down to narrow it down.)

Benno Schulenberg <bens>
Group administrator
Mon 15 Jul 2024 03:45:27 PM UTC, comment #1: 

A more explicit recipe:

src/nano +12 README

Type:  M-A  M-Home

See that nothing seems to be selected.
Now type: ^L

The selection (that is actually present) gets highlighted.

The problem is that the functions to_top_row() and to_bottom_row() forget to refresh the screen when the mark is on.  Will fix that in the coming days.

Thanks for reporting!

Benno Schulenberg <bens>
Group administrator
Mon 15 Jul 2024 10:48:49 AM UTC, original submission:  

To reproduce:

1. Go to a random line in the file (e.g. the first line)
2. Set the mark
3. Trigger {bottomrow}.

Intended result, the lines between the original line and the bottom of the viewport get selected. (or top respectively, if toprow is used instead of bottomrow).

Actual result, the cursor moves to the bottom of the viewport (or top respectively), but without a corresponding selection.

Furthermore, after such an event, moving the cursor up or down from that point results in inconsistent behaviour (e.g. if the mark was set in line 10 and the bottom of the viewport was line 20, moving the cursor above line 10 will create a selection, as well as below 20, but lines 10-20 are unselectable).

Tasos Papastylianou <tpapastylianou>

 

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

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 (Posted a comment)
  • -email is unavailable- added by tpapastylianou (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-09-06 bens Open/ClosedOpen Closed
    2024-07-18 bens Severity3 - Normal 4 - Important
        StatusNone Fixed
    2024-07-15 bens Assigned toNone bens
        SummaryTriggering {toprow} or {bottomrow} while the mark is on does not result in a correspoding selection Alt+Home/Alt+End while the mark is on does not highlight the selection

    Back to the top

    Powered by Savane 3.15-64aa.
    Corresponding source code