support osc 52 clipboard copy integration.

This feature is particularly relevant for mosh for chrome (which also
used in windows I believe).
This commit is contained in:
Alex Cornejo
2017-07-15 19:06:14 +00:00
committed by John Hood
parent 04f6dafb58
commit 4b240ac033
5 changed files with 38 additions and 7 deletions
+3 -1
View File
@@ -42,6 +42,8 @@
using namespace Terminal;
static const size_t MAXIMUM_CLIPBOARD_SIZE = 16*1024;
Dispatcher::Dispatcher()
: params(), parsed_params(), parsed( false ), dispatch_chars(),
OSC_string(), terminal_to_host()
@@ -235,7 +237,7 @@ void Dispatcher::dispatch( Function_Type type, const Parser::Action *act, Frameb
void Dispatcher::OSC_put( const Parser::OSC_Put *act )
{
assert( act->char_present );
if ( OSC_string.size() < 256 ) { /* should be a long enough window title */
if ( OSC_string.size() < MAXIMUM_CLIPBOARD_SIZE) {
OSC_string.push_back( act->ch );
}
}