Bug 324946 - Request for Bracketed paste mode
Summary: Request for Bracketed paste mode
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: copy-paste (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-15 22:15 UTC by Egmont Koblinger
Modified: 2014-01-11 23:49 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Demo patch (17.22 KB, patch)
2013-09-15 23:32 UTC, Egmont Koblinger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Egmont Koblinger 2013-09-15 22:15:24 UTC
Could you please add "Bracketed paste mode" feature to Konsole? Quite a few terminals and applications support it already.

When enabled by '\e[?2004h', pasted data is surrounded by \e[200~ and \e[201~. This is mainly for text editors to temporarily switch off autoindent and line wrapping.

Main doc:
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#Bracketed%20Paste%20Mode

Random links from other terminals and apps:
https://bugzilla.gnome.org/show_bug.cgi?id=605299
http://code.google.com/p/iterm2/issues/detail?id=1403
https://www.midnight-commander.org/ticket/2661

Reproducible: Always
Comment 1 Egmont Koblinger 2013-09-15 23:32:42 UTC
Created attachment 82331 [details]
Demo patch

A working patch is added.

Most of the time I just copied usesMouse without understanding what happens. Probably some parts are not needed. The variable name "programBracketedPasteMode" doesn't make much sense. Could you please clean up my work? :)
Comment 2 Kurt Hindenburg 2013-11-16 17:04:35 UTC
Thanks, I'll see about getting it committed.
Comment 3 Egmont Koblinger 2014-01-08 00:29:31 UTC
Friendly ping :)

This is getting a really widespread feature of terminals.  It is currently supported by at least xterm, vte/gnome-terminal, pterm/putty, st [suckless], terminology [enlightenment], urxvt, iterm2.
Comment 4 Kurt Hindenburg 2014-01-11 17:35:16 UTC
Git commit 8082bcd2ef822fbbe06ca8716633f44fd20c0cb4 by Kurt Hindenburg.
Committed on 11/01/2014 at 17:28.
Pushed by hindenburg into branch 'master'.

Add xterm's bracketed paste mode

Allow xterm's bracketed paste mode to work

When enabled by '\e[?2004h', pasted data is surrounded by \e[200~ and
\e[201~. This is mainly for text editors to temporarily switch off
autoindent and line wrapping.

http://invisible-island.net/xterm/ctlseqs/ctlseqs.html

This page have a .vimrc that will trigger this
https://bugzilla.gnome.org/show_bug.cgi?id=605299

Thanks to Egmont Koblinger for patch
Related: bug 4, bug 13

M  +13   -0    src/Emulation.cpp
M  +7    -0    src/Emulation.h
M  +5    -0    src/Session.cpp
M  +14   -0    src/TerminalDisplay.cpp
M  +4    -0    src/TerminalDisplay.h
M  +14   -0    src/Vt102Emulation.cpp
M  +2    -1    src/Vt102Emulation.h

http://commits.kde.org/konsole/8082bcd2ef822fbbe06ca8716633f44fd20c0cb4
Comment 5 Kurt Hindenburg 2014-01-11 23:49:23 UTC
Git commit 886f12d730e0678bb193827a75074f178a8e8d62 by Kurt Hindenburg.
Committed on 11/01/2014 at 17:28.
Pushed by hindenburg into branch 'frameworks'.

Add xterm's bracketed paste mode

Allow xterm's bracketed paste mode to work

When enabled by '\e[?2004h', pasted data is surrounded by \e[200~ and
\e[201~. This is mainly for text editors to temporarily switch off
autoindent and line wrapping.

http://invisible-island.net/xterm/ctlseqs/ctlseqs.html

This page have a .vimrc that will trigger this
https://bugzilla.gnome.org/show_bug.cgi?id=605299

Thanks to Egmont Koblinger for patch
Related: bug 4, bug 13

(cherry picked from commit 8082bcd2ef822fbbe06ca8716633f44fd20c0cb4)

M  +13   -0    src/Emulation.cpp
M  +7    -0    src/Emulation.h
M  +5    -0    src/Session.cpp
M  +14   -0    src/TerminalDisplay.cpp
M  +4    -0    src/TerminalDisplay.h
M  +14   -0    src/Vt102Emulation.cpp
M  +2    -1    src/Vt102Emulation.h

http://commits.kde.org/konsole/886f12d730e0678bb193827a75074f178a8e8d62