On Tue, Apr 15, 2014 at 12:48 AM, Nicholas Marriott
<nicholas.marri...@gmail.com> wrote:
> I was going to bump the limit to 1K but that still seems a little short, try 
> this please:
>
> diff --git a/input.c b/input.c
> index ee46c98..a8be6ad 100644
> [...]

That patch worked wonderfully, thank you!

Here is my new observation on the maximum length of copyable text:

  bash$ printf "\ePtmux;\e\e]52;c;$(cat * | base64 -w0 | head -c32754)\a\e\\"

Putting just 1 more byte in OSC52's base64 payload makes the copy fail:

  bash$ printf "\ePtmux;\e\e]52;c;$(cat * | base64 -w0 | head -c32755)\a\e\\"

In total, this patch lets tmux pass 32772 bytes to the attached
terminal (that's 32754 bytes for OSC52's base64 payload plus 18 bytes
of overhead for the OSC52 and DCS escape sequences).  That limit
correlates to the value of INPUT_LIMIT in tmux.h nicely.

However, since the maximum length of an OSC 52 escape sequence is
100,000 bytes[1] and the patched tmux's DCS escape sequence length
limit is 32772 bytes (as observed above), how would you recommend
sending a maximum-length OSC 52 escape sequence through tmux?

Would splitting a maximum-length OSC 52 escape sequence into chunks
and sending them back-to-back in tmux's maximum-length DCS escape
sequences work?

Thanks for your consideration.

[1]: 
http://git.chromium.org/gitweb/?p=chromiumos/platform/assets.git;a=blob;f=chromeapps/hterm/etc/osc52.vim;h=1cb6931d4f8ad028ca0a1c400389047e1b67228b;hb=HEAD#l21

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to