bugGNU nano - Bugs: bug #65507, in current git, macros with...

 
 

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

bug #65507: in current git, macros with modified keys are broken

Submitter:  Benno Schulenberg <bens>
Submitted:  Fri 22 Mar 2024 03:02:58 PM UTC
   
 
Severity:  5 - Blocker Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Fri 22 Mar 2024 03:36:28 PM UTC, comment #1: 

Fixed in git, commit 9ae84071, by reverting commit 191cf671 from three weeks ago.

(Bug was originally encountered when recording a macro that contained <Ctrl+Shift+Right> and ^K.  When replaying that macro, it cut the entire line instead of just the word that should have been selected.)

Benno Schulenberg <bens>
Group administrator
Fri 22 Mar 2024 03:02:58 PM UTC, original submission:  

To reproduce, run `src/nano --ignore README`, and record a little macro:

M-: M-a ^N ^N M-:

Now execute the macro a few times:

M-; M-; M-; M-; M-;

See how for each execution a literal "a" gets inserted into the buffer, and how the mark stays on the whole time (instead of getting toggled off and on alternatingly).  Owww...  :/

The offending commit is 191cf671: "store keystroke in macro buffer only when about to interpret it", from three weeks ago.

The problem is that the 'M-' part of M-A does not get stored in nano's keystroke buffer but is chalked up only in the 'meta_key' variable.  So... the original way of recording "key codes" as they come in from ncurses was correct after all.

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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-03-22 bens StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code