bugGNU nano - Bugs: bug #63702, in a string bind, {verbatim} does...

 
 

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

bug #63702: in a string bind, {verbatim} does not work

Submitter:  Benno Schulenberg <bens>
Submitted:  Wed 25 Jan 2023 11:37:00 AM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Open

Thu 26 Jan 2023 10:29:51 AM UTC, comment #2: 

Fixed in git, commit 51c9f727, by returning the first byte immediately (when available).

Benno Schulenberg <bens>
Group administrator
Wed 25 Jan 2023 04:06:12 PM UTC, comment #1: 

The problem is that get_code_from_plantation() always returns ERR after putting some of the keycodes of a string bind into the keystrokes buffer.  It should return ERR only when there are no more keycodes left in the string bind (which will normally only occur when the string bind was defined as empty, which is useless); in all other cases it should not put the first of the keycodes into the keystroke buffer but return it immediately.

Benno Schulenberg <bens>
Group administrator
Wed 25 Jan 2023 11:37:00 AM UTC, original submission:  

To reproduce, add this at the end of your .nanorc:

bind M-N "{verbatim}^T{verbatim}^U" main

(where ^T and ^U are literal control codes).

Then run 'nano -xc --mini' and type: M-N

See that a prompt appears and an invalid byte has been entered:

Command to execute: �

Type Enter and see that nano complains:

[ Error: $'\377': command not found ]


Also see that there is an invalid byte in the buffer too.  This byte is 0xFF.

It seems that somehow the {verbatim} function is returning the ERR code instead instead of the next code in the string.  Things work fine when using "^[v" (a literal M-V) instead of "{verbatim}".

Benno Schulenberg <bens>
Group administrator

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2023-02-16 bens Summarythe {verbatim} function does not work (in a string bind) in a string bind, {verbatim} does not work
    2023-01-26 bens StatusIn Progress Fixed
    2023-01-25 bens StatusNone In Progress
        Summarythe {verbatim} function does not work the {verbatim} function does not work (in a string bind)

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code