mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-25 14:05:41 -05:00
Format code
This commit is contained in:
parent
33cfc52909
commit
5cf77bf250
3 changed files with 44 additions and 15 deletions
|
@ -890,7 +890,13 @@ where
|
|||
}
|
||||
|
||||
#[inline]
|
||||
fn csi_dispatch(&mut self, args: &[i64], intermediates: &[u8], has_ignored_intermediates: bool, action: char) {
|
||||
fn csi_dispatch(
|
||||
&mut self,
|
||||
args: &[i64],
|
||||
intermediates: &[u8],
|
||||
has_ignored_intermediates: bool,
|
||||
action: char,
|
||||
) {
|
||||
macro_rules! unhandled {
|
||||
() => {{
|
||||
debug!(
|
||||
|
@ -917,7 +923,9 @@ where
|
|||
let writer = &mut self.writer;
|
||||
|
||||
match (action, intermediates.get(0)) {
|
||||
('@', None) => handler.insert_blank(Column(arg_or_default!(idx: 0, default: 1) as usize)),
|
||||
('@', None) => {
|
||||
handler.insert_blank(Column(arg_or_default!(idx: 0, default: 1) as usize))
|
||||
},
|
||||
('A', None) => {
|
||||
handler.move_up(Line(arg_or_default!(idx: 0, default: 1) as usize));
|
||||
},
|
||||
|
@ -930,12 +938,22 @@ where
|
|||
debug!("tried to repeat with no preceding char");
|
||||
}
|
||||
},
|
||||
('B', None) | ('e', None) => handler.move_down(Line(arg_or_default!(idx: 0, default: 1) as usize)),
|
||||
('B', None) | ('e', None) => {
|
||||
handler.move_down(Line(arg_or_default!(idx: 0, default: 1) as usize))
|
||||
},
|
||||
('c', None) => handler.identify_terminal(writer),
|
||||
('C', None) | ('a', None) => handler.move_forward(Column(arg_or_default!(idx: 0, default: 1) as usize)),
|
||||
('D', None) => handler.move_backward(Column(arg_or_default!(idx: 0, default: 1) as usize)),
|
||||
('E', None) => handler.move_down_and_cr(Line(arg_or_default!(idx: 0, default: 1) as usize)),
|
||||
('F', None) => handler.move_up_and_cr(Line(arg_or_default!(idx: 0, default: 1) as usize)),
|
||||
('C', None) | ('a', None) => {
|
||||
handler.move_forward(Column(arg_or_default!(idx: 0, default: 1) as usize))
|
||||
},
|
||||
('D', None) => {
|
||||
handler.move_backward(Column(arg_or_default!(idx: 0, default: 1) as usize))
|
||||
},
|
||||
('E', None) => {
|
||||
handler.move_down_and_cr(Line(arg_or_default!(idx: 0, default: 1) as usize))
|
||||
},
|
||||
('F', None) => {
|
||||
handler.move_up_and_cr(Line(arg_or_default!(idx: 0, default: 1) as usize))
|
||||
},
|
||||
('g', None) => {
|
||||
let mode = match arg_or_default!(idx: 0, default: 0) {
|
||||
0 => TabulationClearMode::Current,
|
||||
|
@ -945,7 +963,9 @@ where
|
|||
|
||||
handler.clear_tabs(mode);
|
||||
},
|
||||
('G', None) | ('`', None) => handler.goto_col(Column(arg_or_default!(idx: 0, default: 1) as usize - 1)),
|
||||
('G', None) | ('`', None) => {
|
||||
handler.goto_col(Column(arg_or_default!(idx: 0, default: 1) as usize - 1))
|
||||
},
|
||||
('H', None) | ('f', None) => {
|
||||
let y = arg_or_default!(idx: 0, default: 1) as usize;
|
||||
let x = arg_or_default!(idx: 1, default: 1) as usize;
|
||||
|
@ -975,7 +995,9 @@ where
|
|||
},
|
||||
('S', None) => handler.scroll_up(Line(arg_or_default!(idx: 0, default: 1) as usize)),
|
||||
('T', None) => handler.scroll_down(Line(arg_or_default!(idx: 0, default: 1) as usize)),
|
||||
('L', None) => handler.insert_blank_lines(Line(arg_or_default!(idx: 0, default: 1) as usize)),
|
||||
('L', None) => {
|
||||
handler.insert_blank_lines(Line(arg_or_default!(idx: 0, default: 1) as usize))
|
||||
},
|
||||
('l', intermediate) => {
|
||||
let is_private_mode = match intermediate {
|
||||
Some(b'?') => true,
|
||||
|
@ -991,10 +1013,16 @@ where
|
|||
}
|
||||
},
|
||||
('M', None) => handler.delete_lines(Line(arg_or_default!(idx: 0, default: 1) as usize)),
|
||||
('X', None) => handler.erase_chars(Column(arg_or_default!(idx: 0, default: 1) as usize)),
|
||||
('P', None) => handler.delete_chars(Column(arg_or_default!(idx: 0, default: 1) as usize)),
|
||||
('X', None) => {
|
||||
handler.erase_chars(Column(arg_or_default!(idx: 0, default: 1) as usize))
|
||||
},
|
||||
('P', None) => {
|
||||
handler.delete_chars(Column(arg_or_default!(idx: 0, default: 1) as usize))
|
||||
},
|
||||
('Z', None) => handler.move_backward_tabs(arg_or_default!(idx: 0, default: 1)),
|
||||
('d', None) => handler.goto_line(Line(arg_or_default!(idx: 0, default: 1) as usize - 1)),
|
||||
('d', None) => {
|
||||
handler.goto_line(Line(arg_or_default!(idx: 0, default: 1) as usize - 1))
|
||||
},
|
||||
('h', intermediate) => {
|
||||
let is_private_mode = match intermediate {
|
||||
Some(b'?') => true,
|
||||
|
@ -1021,7 +1049,9 @@ where
|
|||
}
|
||||
}
|
||||
},
|
||||
('n', None) => handler.device_status(writer, arg_or_default!(idx: 0, default: 0) as usize),
|
||||
('n', None) => {
|
||||
handler.device_status(writer, arg_or_default!(idx: 0, default: 0) as usize)
|
||||
},
|
||||
('q', Some(b' ')) => {
|
||||
// DECSCUSR (CSI Ps SP q) -- Set Cursor Style
|
||||
let style = match arg_or_default!(idx: 0, default: 0) {
|
||||
|
|
|
@ -27,7 +27,7 @@ use crate::config::{Config, StartupMode};
|
|||
use crate::index::Line;
|
||||
use crate::message_bar::Message;
|
||||
use crate::meter::Meter;
|
||||
use crate::renderer::rects::{RenderRect, RenderLines};
|
||||
use crate::renderer::rects::{RenderLines, RenderRect};
|
||||
use crate::renderer::{self, GlyphCache, QuadRenderer};
|
||||
use crate::sync::FairMutex;
|
||||
use crate::term::color::Rgb;
|
||||
|
|
|
@ -393,7 +393,6 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> {
|
|||
let mouse_mode =
|
||||
TermMode::MOUSE_MOTION | TermMode::MOUSE_DRAG | TermMode::MOUSE_REPORT_CLICK;
|
||||
|
||||
|
||||
// Check message bar before URL to ignore URLs in the message bar
|
||||
if let Some(message) = self.message_at_point(Some(point)) {
|
||||
if self.message_close_at_point(point, message) {
|
||||
|
|
Loading…
Reference in a new issue