Use TERM env var / terminfo to decide whether to send ECH. Fixes tmux bug.

Closes #28 github issue.
This commit is contained in:
Keith Winstein
2012-03-10 05:41:03 -05:00
parent ac16f9127c
commit b8457dd308
13 changed files with 114 additions and 23 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ string Complete::diff_from( const Complete &existing ) const
new_res->MutableExtension( resize )->set_height( terminal.get_fb().ds.get_height() );
}
Instruction *new_inst = output.add_instruction();
new_inst->MutableExtension( hostbytes )->set_hoststring( Terminal::Display::new_frame( true, existing.get_fb(), terminal.get_fb() ) );
new_inst->MutableExtension( hostbytes )->set_hoststring( display.new_frame( true, existing.get_fb(), terminal.get_fb() ) );
}
return output.SerializeAsString();
+2 -1
View File
@@ -32,6 +32,7 @@ namespace Terminal {
private:
Parser::UTF8Parser parser;
Terminal::Emulator terminal;
Terminal::Display display;
std::list< std::pair<uint64_t, uint64_t> > input_history;
uint64_t echo_ack;
@@ -39,7 +40,7 @@ namespace Terminal {
static const int ECHO_TIMEOUT = 50; /* for late ack */
public:
Complete( size_t width, size_t height ) : parser(), terminal( width, height ),
Complete( size_t width, size_t height ) : parser(), terminal( width, height ), display( false ),
input_history(), echo_ack( 0 ) {}
std::string act( const std::string &str );