bugGNU nano - Bugs: bug #57660, when running a macro on a VT,...

 
 

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

bug #57660: when running a macro on a VT, modifier keys affect the result

Submitter:  Benno Schulenberg <bens>
Submitted:  Thu 23 Jan 2020 11:01:05 AM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Sun 09 Feb 2020 10:29:07 AM UTC, comment #2: 

The fix has been released in version 4.8.

Benno Schulenberg <bens>
Group administrator
Thu 23 Jan 2020 11:46:23 AM UTC, comment #1: 

Fixed in git, commit fa686457.

Benno Schulenberg <bens>
Group administrator
Thu 23 Jan 2020 11:01:05 AM UTC, original submission:  

When the 'runmacro' function is bound to a keystroke that involves Ctrl or Shift, and a defined macro contains unmodified cursor-movement keystrokes, then running the macro will act as if the those cursor-movement keystrokes were done together with Ctrl and/or Shift.

To reproduce, add the following two lines at the end of your ~/.nanorc:


bind ^D recordmacro main
bind ^R runmacro main


Then run 'src/nano +1 README'.  Then first define a macro with: ^D <Down> <Down> <Down> ^D.  Then run the macro with ^R.  When doing this on a terminal emulator, it works fine: the cursor goes down three lines.  But when doing this on a VT, the cursor goes down three blocks of text!  And when you type <Shift+Ctrl+R>, nano will even select three blocks of text.  On a terminal emulator this does not happen.

Expected behavior: when executing a macro (or a string bind), any modifiers of the triggering keystroke should be ignored.

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
    2020-02-09 bens Open/ClosedOpen Closed
    2020-01-23 bens Summarywhen running a macro on a Linux console, modifier keys affect the result when running a macro on a VT, modifier keys affect the result
    2020-01-23 bens Severity3 - Normal 2 - Minor
        StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code