mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 21:32:13 +03:00
use vte with larger OSC buffer support
I wanted to see how much work remains to enable iterm2 image display; one of the blockers was a limit in the size of the buffer in the vte crate, which has been removed in my fork of vte. As part of testing our ability to absorb that data, I found a couple of issues with applying the image cells to the display, so this commit also takes care of that. We still don't have code to connect the cell image data to the opengl render layer.
This commit is contained in:
parent
a4a078cf98
commit
1a883a40e9
@ -1233,19 +1233,25 @@ impl TerminalState {
|
||||
|
||||
let mut ypos = NotNaN::new(0.0).unwrap();
|
||||
let cursor_x = self.cursor.x;
|
||||
let cursor_y = self.cursor.y;
|
||||
let x_delta = 1.0 / available_pixel_width as f32;
|
||||
let y_delta = 1.0 / available_pixel_height as f32;
|
||||
eprintln!(
|
||||
"image is {}x{} cells, {}x{} pixels",
|
||||
width_in_cells, height_in_cells, width, height
|
||||
);
|
||||
for y in 0..height_in_cells {
|
||||
for _ in 0..height_in_cells {
|
||||
let mut xpos = NotNaN::new(0.0).unwrap();
|
||||
let cursor_y = self.cursor.y;
|
||||
eprintln!(
|
||||
"setting cells for y={} x=[{}..{}]",
|
||||
cursor_y,
|
||||
cursor_x,
|
||||
cursor_x + width_in_cells
|
||||
);
|
||||
for x in 0..width_in_cells {
|
||||
self.screen_mut().set_cell(
|
||||
cursor_x + x,
|
||||
cursor_y + y as VisibleRowIndex,
|
||||
cursor_y, // + y as VisibleRowIndex,
|
||||
&Cell::new(
|
||||
' ',
|
||||
CellAttributes::default()
|
||||
@ -1263,13 +1269,16 @@ impl TerminalState {
|
||||
xpos += x_delta;
|
||||
}
|
||||
ypos += y_delta;
|
||||
self.new_line(false);
|
||||
}
|
||||
|
||||
// FIXME: check cursor positioning in iterm
|
||||
/*
|
||||
self.set_cursor_pos(
|
||||
&Position::Relative(width_in_cells as i64),
|
||||
&Position::Relative(0),
|
||||
&Position::Relative(-(height_in_cells as i64)),
|
||||
);
|
||||
*/
|
||||
}
|
||||
|
||||
fn perform_device(&mut self, dev: Device, host: &mut TerminalHost) {
|
||||
|
@ -26,7 +26,9 @@ smallvec = "~0.6"
|
||||
terminfo = "~0.6"
|
||||
unicode-segmentation = "~1.2"
|
||||
unicode-width = "~0.1"
|
||||
vte = "~0.3"
|
||||
|
||||
# https://github.com/jwilm/vte/pull/20
|
||||
vte = { git = "https://github.com/wez/vte", branch="oscbigbuf" }
|
||||
|
||||
[dev-dependencies]
|
||||
bincode = "1.1"
|
||||
|
Loading…
Reference in New Issue
Block a user