diff options
author | Christian Duerr <contact@christianduerr.com> | 2021-12-23 10:23:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-23 12:23:06 +0200 |
commit | 3af1940192245f96f0b7c8e2d2d5c4a5d8eb98a1 (patch) | |
tree | d2e8132a7b0acfc6f44c7f8e4ca0d7f5f78a5432 /alacritty_terminal/src | |
parent | 6d1a63ef28d18168ed4ca0d6a8c3413cb4621ca5 (diff) | |
download | alacritty-3af1940192245f96f0b7c8e2d2d5c4a5d8eb98a1.tar.gz alacritty-3af1940192245f96f0b7c8e2d2d5c4a5d8eb98a1.zip |
Fix CreateNewWindow CLI fallback
The existing behavior for the new CreateNewWindow actions was to always
pass in their own options, which would discard the existing options
configured on the terminal's PTY config.
To fix this the behavior for CreateNewWindow is now the same as for the
initial window creation, the config values are overwritten conditionally
based on their individual presence in the CLI options.
However all temporary CLI options set on the "master" Alacritty
instance are discarded by all future windows.
Fixes #5659.
Diffstat (limited to 'alacritty_terminal/src')
-rw-r--r-- | alacritty_terminal/src/ansi.rs | 2 | ||||
-rw-r--r-- | alacritty_terminal/src/index.rs | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/alacritty_terminal/src/ansi.rs b/alacritty_terminal/src/ansi.rs index 55492d36..25ea8af3 100644 --- a/alacritty_terminal/src/ansi.rs +++ b/alacritty_terminal/src/ansi.rs @@ -697,6 +697,7 @@ pub enum NamedColor { } impl NamedColor { + #[must_use] pub fn to_bright(self) -> Self { match self { NamedColor::Foreground => NamedColor::BrightForeground, @@ -721,6 +722,7 @@ impl NamedColor { } } + #[must_use] pub fn to_dim(self) -> Self { match self { NamedColor::Black => NamedColor::DimBlack, diff --git a/alacritty_terminal/src/index.rs b/alacritty_terminal/src/index.rs index 29b3eb15..e672c752 100644 --- a/alacritty_terminal/src/index.rs +++ b/alacritty_terminal/src/index.rs @@ -20,6 +20,7 @@ pub enum Direction { } impl Direction { + #[must_use] pub fn opposite(self) -> Self { match self { Side::Right => Side::Left, @@ -133,6 +134,7 @@ pub struct Line(pub i32); impl Line { /// Clamp a line to a grid boundary. + #[must_use] pub fn grid_clamp<D: Dimensions>(self, dimensions: &D, boundary: Boundary) -> Self { match boundary { Boundary::Cursor => max(Line(0), min(dimensions.bottommost_line(), self)), |