aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAyose <ayosec@gmail.com>2022-10-20 22:35:36 +0100
committerAyose <ayosec@gmail.com>2022-10-20 22:35:36 +0100
commit48a388ad91d268ed97355df629a22e2d476aee2a (patch)
tree2ad68d4fdfaf660f8bf7330edf41cd22d7474ecd
parented6e3fa3dfec1ce59eb0ed9ed0ed3bfc4f4b1da6 (diff)
downloadr-alacritty-48a388ad91d268ed97355df629a22e2d476aee2a.tar.gz
r-alacritty-48a388ad91d268ed97355df629a22e2d476aee2a.tar.bz2
r-alacritty-48a388ad91d268ed97355df629a22e2d476aee2a.zip
Apply rustfmt to term/mod.rs.
-rw-r--r--alacritty_terminal/src/term/mod.rs40
1 files changed, 24 insertions, 16 deletions
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs
index 046d08cf..e814d30b 100644
--- a/alacritty_terminal/src/term/mod.rs
+++ b/alacritty_terminal/src/term/mod.rs
@@ -2037,41 +2037,49 @@ impl<T: EventListener> Handler for Term<T> {
let (ps, pv) = match pi {
1 => {
match pa {
- 1 => (0, &[sixel::MAX_COLOR_REGISTERS][..]), // current value is always the maximum
+ 1 => (0, &[sixel::MAX_COLOR_REGISTERS][..]), // current value is always the
+ // maximum
2 => (3, &[][..]), // Report unsupported
3 => (3, &[][..]), // Report unsupported
4 => (0, &[sixel::MAX_COLOR_REGISTERS][..]),
_ => (2, &[][..]), // Report error in Pa
}
- }
+ },
+
2 => {
match pa {
1 => {
- self.event_proxy.send_event(Event::TextAreaSizeRequest(Arc::new(move |window_size| {
- let width = window_size.num_cols * window_size.cell_width;
- let height = window_size.num_lines * window_size.cell_height;
- let graphic_dimensions = [
- cmp::min(width as usize, MAX_GRAPHIC_DIMENSIONS[0]),
- cmp::min(height as usize, MAX_GRAPHIC_DIMENSIONS[1])];
-
- let (ps, pv) = (0, &graphic_dimensions[..]);
- generate_response(pi, ps, pv)
- })));
+ self.event_proxy.send_event(Event::TextAreaSizeRequest(Arc::new(
+ move |window_size| {
+ let width = window_size.num_cols * window_size.cell_width;
+ let height = window_size.num_lines * window_size.cell_height;
+ let graphic_dimensions = [
+ cmp::min(width as usize, MAX_GRAPHIC_DIMENSIONS[0]),
+ cmp::min(height as usize, MAX_GRAPHIC_DIMENSIONS[1]),
+ ];
+
+ let (ps, pv) = (0, &graphic_dimensions[..]);
+ generate_response(pi, ps, pv)
+ },
+ )));
return;
- }
+ },
2 => (3, &[][..]), // Report unsupported
3 => (3, &[][..]), // Report unsupported
4 => (0, &MAX_GRAPHIC_DIMENSIONS[..]),
_ => (2, &[][..]), // Report error in Pa
}
- }
+ },
+
3 => {
(1, &[][..]) // Report error in Pi (ReGIS unknown)
- }
+ },
+
_ => {
(1, &[][..]) // Report error in Pi
- }
+ },
};
+
self.event_proxy.send_event(Event::PtyWrite(generate_response(pi, ps, pv)));
}