bugGNU nano - Bugs: bug #40060, [Request] bracketed paste mode

 
 

bug #40060: [Request] bracketed paste mode

Submitted by:  Egmont Koblinger <egmont>
Submitted on:  Wed Sep 18 15:41:35 2013  
 
Severity: 3 - NormalStatus: None
Assigned to: NoneOpen/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed Sep 18 15:49:55 2013, comment #1:

(Sorry, I meant ^[?2004h and ^[?2004l.)

Egmont Koblinger <egmont>
Wed Sep 18 15:41:35 2013, original submission:

Please consider supporting bracketed paste mode (http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#Bracketed%20Paste%20Mode), supported by many terminals.

Enable by outputting ^[[2004h after switching to the alternate screen, disable by ^[[2004l before switching back.

If any user data is pasted (by mouse or terminal's shortcut keys or meny entry), rather than typed in from the keyboard, it will be surrounded by ^[[200~ and ^[[201~.

The desired behavior is to turn off word wrapping and auto indentation for pasted data; perhaps also turn off tab->spaces conversion. So that when e.g. source code is pasted, it won't get that well-known ever-increasing indentation.

The current code around get_escape_seq_kbinput() expects that if there's an escape sequence in the input buffer then there's no data following it, or it gets dropped. Detecting the incoming escapes near "F9 on VT220/VT320/Linux console/xterm/rxvt/Eterm" is easy but then unfortunately the actual pasted data gets dropped. This would require infrastructure change to keep and later process the non-consumed characters. That would be a good change anyways since the current design looks fragile. (I'm really not sure that multiple layers of terminal multiplexers, network connections, whatnot cannot combine two keypresses into a single read() call which is now handled incorrectly.)

Egmont Koblinger <egmont>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Updated the item)
  • -unavailable- added by egmont (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat Jun 14 16:08:21 2014bensSummary[request] bracketed paste mode=>[Request] bracketed paste mode
    Fri Jun 13 15:59:15 2014bensSummaryBracketed paste mode=>[request] bracketed paste mode

    Back to the top


    Powered by Savane 3.1-cleanup