diff options
author | Benjamin Barenblat <bbarenblat@gmail.com> | 2021-12-26 13:53:22 -0500 |
---|---|---|
committer | Benjamin Barenblat <bbarenblat@gmail.com> | 2021-12-26 14:55:31 -0500 |
commit | 4b49b1d0cc23f909d1be89cf8f816f820b343e0a (patch) | |
tree | 331616bf0cf1643e9abec6a49e2ead10e58ed0aa /src/ui/terminal/line.h | |
parent | 520bbd892ada57a5c93680eae3c9d7eb691073af (diff) |
Don’t hard-code escape sequences
Instead of hard-coding VT100-compatible escape sequences, parse the
system terminfo database and read escape sequences from it. This is
both more flexible (it should work well on more terminals) and more
efficient (it won’t insert padding on terminals that don’t need it).
Diffstat (limited to 'src/ui/terminal/line.h')
-rw-r--r-- | src/ui/terminal/line.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ui/terminal/line.h b/src/ui/terminal/line.h index a90e2b7..dfe86cb 100644 --- a/src/ui/terminal/line.h +++ b/src/ui/terminal/line.h @@ -19,8 +19,10 @@ #include <termios.h> +#include <memory> #include <thread> +#include "goldfishterm/simple.h" #include "third_party/abseil/absl/base/thread_annotations.h" #include "third_party/abseil/absl/strings/string_view.h" #include "third_party/abseil/absl/synchronization/mutex.h" @@ -81,6 +83,7 @@ class TerminalLine final { void WriteRaw(absl::string_view bytes) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_); termios original_termios_, current_termios_; + std::unique_ptr<goldfishterm::SimpleTerminalOutput> tty_; std::thread sigwinch_watcher_; |