bugGNU nano - Bugs: bug #65087, the shown shortcut for "Go To...

 
 

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

bug #65087: the shown shortcut for "Go To Line" is an invalid keystroke on Mac's default Terminal

Submitter:  William Davis <awesomesheep48>
Submitted:  Thu 28 Dec 2023 04:19:12 AM UTC
   
 
Severity:  2 - Minor Status:  None
Assigned to:  None Open/Closed:  Open

Mon 15 Jan 2024 10:30:36 AM UTC, comment #5: 

Thanks for the feedback.  So... I could show always ^- for "Go To Line" when nano is compiled for a Mac.  But... as most Mac users use iTerm2 and I prefer to show ^/ (because of the mnemonics: a plain slash means "Search" in several programs, and "GoTo" is a kind of search), I will keep it as it is  for now.

When you find a reliable way of distinguishing between an iTerm2 and the default Terminal app during runtime, let me know, then I'll adjust the code.

Benno Schulenberg <bens>
Group administrator
Mon 15 Jan 2024 03:17:03 AM UTC, comment #4: 

Sorry, I'd switched to using iTerm2 and kind of forgot about this issue. ^/, ^-, and ^_ all invoke "Go To Line" when using iTerm2.

William Davis <awesomesheep48>
Fri 29 Dec 2023 11:44:22 AM UTC, comment #3: 

Thanks for testing.  It's good to know that ^/ invokes "Go To Line" on an iTerm2.  But... does ^- and ^_ do that too?  Or does ^- maybe reduce the font size, like on most terminal emulators on Linux?

Using "__APPLE__" can detect whether nano was compiled on macOS, but not whether it is running on macOS.  (Maybe it doesn't matter, though, if no one runs a Linux binary on a Mac.)

Benno Schulenberg <bens>
Group administrator
Thu 28 Dec 2023 10:03:33 PM UTC, comment #2: 

I belive you could detect if nano was on macOS by using "__APPLE__" in the way "__LINUX__" is currently used.

Also I tested it, and ^/ works on iTerm2.

William Davis <awesomesheep48>
Thu 28 Dec 2023 03:52:44 PM UTC, comment #1: 

How can nano detect that it is running on MacOS?

Also, what does ^/ do in iTerm2?  (If it does "Go To Line" there, then I'm not going to change anything, as iTerm2 is the better and more-used terminal app.)

Benno Schulenberg <bens>
Group administrator
Thu 28 Dec 2023 04:19:12 AM UTC, original submission:  

When using macOS' default terminal (terminal.app), inputting "^/" as nano suggests does not bring up the "go to line" menu, however "^-" and "^_" do work, and the terminal just beeps. The shortcut bar should be changed to display "^-" or "^_" as the shortcut on macOS, as it already does on Linux <https://git.savannah.gnu.org/cgit/nano.git/tree/src/global.c#n1162>.

William Davis <awesomesheep48>

 

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

Attached Files

 

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 awesomesheep48 (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-01-15 bens StatusNeed Info None
    2024-01-09 bens StatusNone Need Info
        SummaryThe shortcut for &quot;Go to line&quot; is labelled as an invalid key combination on macOS the shown shortcut for "Go To Line" is an invalid keystroke on Mac's default Terminal
    2023-12-28 bens Severity3 - Normal 2 - Minor
    2023-12-28 awesomesheep48 Attached File- Added Screenshot@2023-12-27@at@23.18.00.png, #55483

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code