nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] warning the user that some keys cannot be rebound


From: Rishabh Dave
Subject: Re: [Nano-devel] warning the user that some keys cannot be rebound
Date: Wed, 14 Sep 2016 18:21:59 +0530

On Tue, Sep 13, 2016 at 1:13 AM, Benno Schulenberg
<address@hidden> wrote:
>
> On Mon, Sep 12, 2016, at 18:56, Rishabh Dave wrote:
>> On Sun, Sep 11, 2016 at 8:46 PM, Benno Schulenberg wrote:
>> > No, it doesn't.  If I put "bind Mxa help all" in my .nanorc,
>> > it gets accepted -- but it shouldn't.  Please add a condition
>> > for that, as the first condition in the series.
>>
>> Okay, I was only considering cases like MSpaces (missing hyphen).
>> Cases like Mxa are also covered this time.
>
> -    } else if (keycopy[0] == '^' && (keycopy[1] < 64 || keycopy[1] > 127)) {
> +    } else if ((keycopy[1] != '-' && keycopy[0] == '^' &&
> +               ((keycopy[1] < 64 || keycopy[1] > 127) || [...]
>
> O, come on, you can't be serious.  You didn't even test this!
> "bind Mxa help all" still gets accepted.
>

Ehh... I wasn't even thinking straight.  :(

I have attached (signed) patch.


We allow ASCII character key code between 64 and 127, but many of
those are not coloured, aren't recognized and/or run function same as
some other keys.
Just in case you will want to look at ASCII table -
https://simple.wikipedia.org/wiki/ASCII#/media/File:ASCII-Table-wide.svg
- and/or UTF8 table -
https://en.wikipedia.org/wiki/UTF-8#Codepage_layout.

Following were results of test.

bind ^\ uncut main
bind ^] curpos main
bind ^^ exit main
bind ^_ whereis main
bind ^@ gotoline main #not coloured
bind ^[ writeout main #doesn't work, not recognized, not coloured
bind ^{ redo main #doesn't work, not recognized
bind ^| cut main #doesn't work, runs same func as ^\
bind ^} help main #doesn't work, runs same func as ^]
bind ^~ speller main #not coloured, doesn't work, runs same func as ^^
bind ^` undo main #doesn't work, runs same func as ^@, not coloured


Different bug or goes with this (in case we will want to report them
to user)? Or are they are left out purposefully?

Attachment: 0001-rcfile-reject-key-names-that-are-wrong-or-too-long.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]