mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Add changelog
This commit is contained in:
parent
6a001a431e
commit
d1876489b0
4 changed files with 20 additions and 17 deletions
|
|
@ -16,6 +16,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/):
|
||||||
|
|
||||||
- Bulk create ([#3793])
|
- Bulk create ([#3793])
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Rename `<BackTab>` to `<S-Tab>` ([#3989])
|
||||||
|
- Remove Legacy Console Mode on Windows ([#3989])
|
||||||
|
|
||||||
## [v26.5.6]
|
## [v26.5.6]
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
@ -1721,3 +1726,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/):
|
||||||
[#3906]: https://github.com/sxyazi/yazi/pull/3906
|
[#3906]: https://github.com/sxyazi/yazi/pull/3906
|
||||||
[#3934]: https://github.com/sxyazi/yazi/pull/3934
|
[#3934]: https://github.com/sxyazi/yazi/pull/3934
|
||||||
[#3943]: https://github.com/sxyazi/yazi/pull/3943
|
[#3943]: https://github.com/sxyazi/yazi/pull/3943
|
||||||
|
[#3989]: https://github.com/sxyazi/yazi/pull/3989
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ macro_rules! errln {
|
||||||
macro_rules! writef {
|
macro_rules! writef {
|
||||||
($dst:expr, $($arg:tt)*) => {{
|
($dst:expr, $($arg:tt)*) => {{
|
||||||
use std::io::Write as _;
|
use std::io::Write as _;
|
||||||
write!($dst, $($arg)*).and_then(|_| ($dst).flush())
|
let dst = &mut $dst;
|
||||||
|
write!(dst, $($arg)*).and_then(|_| dst.flush())
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -190,8 +190,8 @@ impl Parser {
|
||||||
let cb = parse_next::<u8>(&mut it)?.checked_sub(32).ok_or(ParseError::Invalid)?;
|
let cb = parse_next::<u8>(&mut it)?.checked_sub(32).ok_or(ParseError::Invalid)?;
|
||||||
let (kind, modifiers) = MouseEventKind::from_cb(cb)?;
|
let (kind, modifiers) = MouseEventKind::from_cb(cb)?;
|
||||||
|
|
||||||
let column = parse_next::<u16>(&mut it)? - 1;
|
let column = parse_next::<u16>(&mut it)?.checked_sub(1).ok_or(ParseError::Invalid)?;
|
||||||
let row = parse_next::<u16>(&mut it)? - 1;
|
let row = parse_next::<u16>(&mut it)?.checked_sub(1).ok_or(ParseError::Invalid)?;
|
||||||
|
|
||||||
Ok(Event::Mouse(MouseEvent { kind, column, row, modifiers }))
|
Ok(Event::Mouse(MouseEvent { kind, column, row, modifiers }))
|
||||||
}
|
}
|
||||||
|
|
@ -212,8 +212,8 @@ impl Parser {
|
||||||
// Mouse positions are encoded as (value + 32), but the upper left
|
// Mouse positions are encoded as (value + 32), but the upper left
|
||||||
// character position on the terminal is denoted as 1,1.
|
// character position on the terminal is denoted as 1,1.
|
||||||
// So, we need to subtract 32 + 1 (33) to keep it synced with the cursor.
|
// So, we need to subtract 32 + 1 (33) to keep it synced with the cursor.
|
||||||
let column = u16::from(seq[4].saturating_sub(33));
|
let column = u16::from(seq[4].checked_sub(33).ok_or(ParseError::Invalid)?);
|
||||||
let row = u16::from(seq[5].saturating_sub(33));
|
let row = u16::from(seq[5].checked_sub(33).ok_or(ParseError::Invalid)?);
|
||||||
|
|
||||||
Ok(Event::Mouse(MouseEvent { kind, column, row, modifiers }))
|
Ok(Event::Mouse(MouseEvent { kind, column, row, modifiers }))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,36 +48,32 @@ impl<'a> Terminal<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn enter_raw_mode(&self) -> io::Result<()> {
|
pub fn enter_raw_mode(&self) -> io::Result<()> {
|
||||||
_ = self.set_input_mode(
|
self.set_input_mode(
|
||||||
(self.restorer.input_mode
|
(self.restorer.input_mode
|
||||||
& !(ENABLE_ECHO_INPUT | ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT))
|
& !(ENABLE_ECHO_INPUT | ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT))
|
||||||
| ENABLE_VIRTUAL_TERMINAL_INPUT
|
| ENABLE_VIRTUAL_TERMINAL_INPUT
|
||||||
| ENABLE_MOUSE_INPUT
|
| ENABLE_MOUSE_INPUT
|
||||||
| ENABLE_WINDOW_INPUT,
|
| ENABLE_WINDOW_INPUT,
|
||||||
);
|
)?;
|
||||||
|
|
||||||
_ = self.set_output_mode(
|
self.set_output_mode(
|
||||||
self.restorer.output_mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING | DISABLE_NEWLINE_AUTO_RETURN,
|
self.restorer.output_mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING | DISABLE_NEWLINE_AUTO_RETURN,
|
||||||
);
|
)
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn enter_cooked_mode(&self) -> io::Result<()> {
|
pub fn enter_cooked_mode(&self) -> io::Result<()> {
|
||||||
_ = self.set_output_mode(
|
self.set_output_mode(
|
||||||
self.restorer.output_mode
|
self.restorer.output_mode
|
||||||
& !(ENABLE_VIRTUAL_TERMINAL_PROCESSING | DISABLE_NEWLINE_AUTO_RETURN),
|
& !(ENABLE_VIRTUAL_TERMINAL_PROCESSING | DISABLE_NEWLINE_AUTO_RETURN),
|
||||||
);
|
)?;
|
||||||
|
|
||||||
_ = self.set_input_mode(
|
self.set_input_mode(
|
||||||
(self.restorer.input_mode
|
(self.restorer.input_mode
|
||||||
& !(ENABLE_VIRTUAL_TERMINAL_INPUT | ENABLE_MOUSE_INPUT | ENABLE_WINDOW_INPUT))
|
& !(ENABLE_VIRTUAL_TERMINAL_INPUT | ENABLE_MOUSE_INPUT | ENABLE_WINDOW_INPUT))
|
||||||
| ENABLE_ECHO_INPUT
|
| ENABLE_ECHO_INPUT
|
||||||
| ENABLE_LINE_INPUT
|
| ENABLE_LINE_INPUT
|
||||||
| ENABLE_PROCESSED_INPUT,
|
| ENABLE_PROCESSED_INPUT,
|
||||||
);
|
)
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_input_cp(&self, cp: u32) -> io::Result<()> { bool_ok(unsafe { SetConsoleCP(cp) }) }
|
fn set_input_cp(&self, cp: u32) -> io::Result<()> { bool_ok(unsafe { SetConsoleCP(cp) }) }
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue