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
+5 -2
View File
@@ -87,7 +87,7 @@ DrawState::DrawState( int s_width, int s_height )
}
Framebuffer::Framebuffer( int s_width, int s_height )
: rows(), icon_name(), window_title(), bell_count( 0 ), title_initialized( false ), ds( s_width, s_height )
: rows(), icon_name(), window_title(), clipboard(), bell_count( 0 ), title_initialized( false ), ds( s_width, s_height )
{
assert( s_height > 0 );
assert( s_width > 0 );
@@ -98,7 +98,8 @@ Framebuffer::Framebuffer( int s_width, int s_height )
Framebuffer::Framebuffer( const Framebuffer &other )
: rows( other.rows ), icon_name( other.icon_name ), window_title( other.window_title ),
bell_count( other.bell_count ), title_initialized( other.title_initialized ), ds( other.ds )
clipboard( other.clipboard ), bell_count( other.bell_count ),
title_initialized( other.title_initialized ), ds( other.ds )
{
}
@@ -108,6 +109,7 @@ Framebuffer & Framebuffer::operator=( const Framebuffer &other )
rows = other.rows;
icon_name = other.icon_name;
window_title = other.window_title;
clipboard = other.clipboard;
bell_count = other.bell_count;
title_initialized = other.title_initialized;
ds = other.ds;
@@ -397,6 +399,7 @@ void Framebuffer::reset( void )
ds = DrawState( width, height );
rows = rows_type( height, newrow() );
window_title.clear();
clipboard.clear();
/* do not reset bell_count */
}