bugGNU nano - Bugs: bug #64578, --mouse causes an "[ Unbound...

 
 

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

bug #64578: --mouse causes an "[ Unbound key ]" error on startup on Xfce Terminal

Submitter:  Lawrence R. Steeger <lsteeger>
Submitted:  Mon 21 Aug 2023 10:30:48 PM UTC
   
 
Severity:  4 - Important Status:  Fixed
Assigned to:  bens Open/Closed:  Open

Jump to the original submission

Mon 16 Oct 2023 06:58:27 AM UTC, comment #10: 

The problem is slightly larger: when Alt-Tabbing from Xfce Terminal to another window, nano still reports an "Unbound key".  See the discussion that starts at https://lists.gnu.org/archive/html/bug-ncurses/2023-10/msg00079.html.  And when Alt-Tabbing back to the Terminal, one gets the "Wrong TERM for this terminal" message again, which soon gets annoying.

An improved fix has been pushed in commit ef35ea72.

Benno Schulenberg <bens>
Group administrator
Sun 27 Aug 2023 01:11:44 PM UTC, comment #9: 

Mitigated in git, commit f0f1c94a, by intercepting keycode 0x24C and showing a warning message on the status bar.

(Marked as "Fixed" as there is no "Mitigated" status.)

Benno Schulenberg <bens>
Group administrator
Sun 27 Aug 2023 11:40:30 AM UTC, comment #8: 

Looks ok.

Now the end-user will know what's going on.

Thanks.

Lawrence R. Steeger <lsteeger>
Sun 27 Aug 2023 11:22:00 AM UTC, comment #7: 

I propose to mitigate the problem with attached patch.  What do you think?

(file #55087)

Benno Schulenberg <bens>
Group administrator
Thu 24 Aug 2023 12:57:20 AM UTC, comment #6: 

I've created a bug report at https://gitlab.xfce.org/apps/xfce4-terminal/-/issues/258.

We'll see if anything happens.

This should be could be closed.

Lawrence R. Steeger <lsteeger>
Wed 23 Aug 2023 03:41:44 PM UTC, comment #5: 

So the bug is not actually in ncurses, but in Xfce Terminal, by claiming to be as capable as an xterm.

Benno Schulenberg <bens>
Group administrator
Wed 23 Aug 2023 09:17:43 AM UTC, comment #4: 

Yes, I've used nano for years and ncurses was upgraded this month.

From my /var/log/pacman.log:

[2023-08-09T15:28:40-0500] [ALPM] upgraded ncurses (6.4-1 -> 6.4_20230520-1)

I downgraded to ncurses 6.4-1, rebooted and the bug disappears.

I've created an ncurses bug report at https://savannah.gnu.org/bugs/index.php?64584

Lawrence R. Steeger <lsteeger>
Wed 23 Aug 2023 06:24:50 AM UTC, comment #3: 

Okay.  I can reproduce now on my regular system, by installing a recent ncurses and compiling nano against it.  I installed ncurses-6.4-20230520, the version that Manjaro currently has, and then running `src/nano --mouse` displays the "Unbound key" error.

It happens also with the recent ncurses-6.4-20230812.  But not with the plain ncurses-6.4, from 2022-12-31.  So... the bug is definitely in ncurses, and it hasn't been fixed yet.

Benno Schulenberg <bens>
Group administrator
Wed 23 Aug 2023 05:51:04 AM UTC, comment #2: 

Hm!  I cannot reproduce this on my regular machine.  But I've booted a Manjaro system on my old laptop, and there "set mouse" does trigger an "[ Unbound key ]" error.  :/

Also a self-compiled nano on Manjaro does this.  Commenting out the #ifdef DEBUG around the "Sequence of hex codes" fragment in src/winio.c shows that starting nano somehow produces a keystroke with key code 0x24C.

Where does this code come from?  None of the nano-defined key codes has this value.  I suspect that the issue is in ncurses.  Have you used nano for more than a year?  And did "set mouse" start to complain only somewhat recently?  If yes, could you roll back to an older version of ncurses, reboot, and see if the problem is gone?

Benno Schulenberg <bens>
Group administrator
Tue 22 Aug 2023 02:32:17 PM UTC, comment #1: 

Cannot reproduce.

echo "set mouse" >minirc
nano --rcfile=minirc

There is no error message.

Please attach your full .nanorc and /etc/nanorc.  Probably there is something in there that interferes.

Benno Schulenberg <bens>
Group administrator
Mon 21 Aug 2023 10:30:48 PM UTC, original submission:  

Distribution: Manjaro
Version: GNU nano, version 7.2
         (C) 2023 the Free Software Foundation and various contributors
         Compiled options: --enable-utf8

If "set mouse" present in rc file, "[ Unbound key ]" error
message appears at bottom of editor screen at startup.

Mouse still operates as expected after this error.

Commenting out "set mouse" prevents this error message.

Lawrence R. Steeger <lsteeger>

 

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

Attached Files
file #55067:  nanorc added by lsteeger (11KiB - application/octet-stream - Attached 1: /etc/nanorc; Attached 2: {HOME}/.config/nano/nanorc)
file #55068:  nanorc added by lsteeger (13KiB - application/octet-stream - Attached 1: /etc/nanorc; Attached 2: {HOME}/.config/nano/nanorc)

 

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 lsteeger (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 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-08-27 bens StatusIn Progress Fixed
    2023-08-27 bens Attached File- Added 0001-input-intercept-a-spurious-keycode-and-say-what-the-.patch, #55087
        StatusNone In Progress
    2023-08-23 bens Summary&quot;set mouse&quot; triggers an &quot;[ Unbound key ]&quot; error on editor startup --mouse causes an "[ Unbound key ]" error on startup on Xfce Terminal
    2023-08-23 bens StatusNeed Info None
        Summary&quot;set mouse&quot; causing &quot;[ Unbound key ]&quot; error on editor startup "set mouse" triggers an "[ Unbound key ]" error on editor startup
    2023-08-23 bens Severity3 - Normal 4 - Important
        Assigned toNone bens
    2023-08-22 lsteeger Attached File- Added nanorc, #55067
        Attached File- Added nanorc, #55068
    2023-08-22 bens StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code