1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 23:21:08 +03:00

wezterm: add buffer to termwiztermtab

I noticed that the launch menu was a bit flickery when moving
the mouse around, and I think a buffer will help.
This commit is contained in:
Wez Furlong 2020-06-05 18:03:19 -07:00
parent cadbb6fbb5
commit cb6944f5eb

View File

@ -17,6 +17,7 @@ use filedescriptor::{FileDescriptor, Pipe};
use portable_pty::*;
use std::cell::RefCell;
use std::cell::RefMut;
use std::io::BufWriter;
use std::io::Write;
use std::rc::Rc;
use std::sync::Arc;
@ -235,7 +236,7 @@ pub struct TermWizTerminal {
}
struct TermWizTerminalRenderTty {
render_tx: FileDescriptor,
render_tx: BufWriter<FileDescriptor>,
screen_size: ScreenSize,
}
@ -354,7 +355,7 @@ pub fn allocate(width: usize, height: usize) -> (TermWizTerminal, Rc<dyn Tab>) {
let tw_term = TermWizTerminal {
render_tx: TermWizTerminalRenderTty {
render_tx: render_pipe.write,
render_tx: BufWriter::new(render_pipe.write),
screen_size: ScreenSize {
cols: width,
rows: height,
@ -418,7 +419,7 @@ pub async fn run<
let tw_term = TermWizTerminal {
render_tx: TermWizTerminalRenderTty {
render_tx: render_pipe.write,
render_tx: BufWriter::new(render_pipe.write),
screen_size: ScreenSize {
cols: width,
rows: height,