aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAyose <ayosec@gmail.com>2025-01-07 00:00:00 +0000
committerAyose <ayosec@gmail.com>2025-01-07 00:00:00 +0000
commit3ad9cdc04058523f2a2858534951fb878d94d822 (patch)
tree82d45189b7990652038d5de55fc075e5bf0ce223
parent9e9e43d209f19e368153e79c898c09ced9671971 (diff)
parent8cb359ad024736bba5456999a67f2a426529dcc7 (diff)
downloadr-alacritty-3ad9cdc04058523f2a2858534951fb878d94d822.tar.gz
r-alacritty-3ad9cdc04058523f2a2858534951fb878d94d822.tar.bz2
r-alacritty-3ad9cdc04058523f2a2858534951fb878d94d822.zip
Merge commit '8cb359ad' into graphics
-rw-r--r--CHANGELOG.md3
-rw-r--r--Cargo.lock8
-rw-r--r--README.md2
-rw-r--r--alacritty/Cargo.toml2
-rw-r--r--alacritty/src/event.rs12
-rw-r--r--alacritty/src/input/keyboard.rs21
-rw-r--r--alacritty/src/input/mod.rs9
-rw-r--r--alacritty_terminal/CHANGELOG.md4
-rw-r--r--alacritty_terminal/src/term/mod.rs30
-rw-r--r--extra/linux/org.alacritty.Alacritty.appdata.xml43
10 files changed, 87 insertions, 47 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 94672511..f23f442f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,10 +13,12 @@ Notable changes to the `alacritty_terminal` crate are documented in its
### Added
- Config option `window.level = "AlwaysOnTop"` to force Alacritty to always be the toplevel window
+- Escape sequence to move cursor forward tabs ( CSI Ps I )
### Changed
- Always focus new windows on macOS
+- Don't switch to semantic/line selection when control is pressed
### Fixed
@@ -26,6 +28,7 @@ Notable changes to the `alacritty_terminal` crate are documented in its
- `alacritty migrate` crashing with recursive toml imports
- Migrating nonexistent toml import breaking the entire migration
- First daemon mode window ignoring window options passed through CLI
+- Report of Enter/Tab/Backspace in kitty keyboard's report event types mode
## 0.14.0
diff --git a/Cargo.lock b/Cargo.lock
index 360a329e..60f10cfa 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2060,9 +2060,9 @@ dependencies = [
[[package]]
name = "vte-graphics"
-version = "0.13.0"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2864755f49461b8296184ac43e06516a4bc47dab4d4d06396b8c852f3e7c1593"
+checksum = "7a567531be6ebf19138eed358a880b7959f206cb79dec94a83d145797aedc4bd"
dependencies = [
"bitflags 2.6.0",
"cursor-icon",
@@ -2541,9 +2541,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winit"
-version = "0.30.7"
+version = "0.30.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dba50bc8ef4b6f1a75c9274fb95aa9a8f63fbc66c56f391bd85cf68d51e7b1a3"
+checksum = "f5d74280aabb958072864bff6cfbcf9025cf8bfacdde5e32b5e12920ef703b0f"
dependencies = [
"ahash",
"android-activity",
diff --git a/README.md b/README.md
index d00520b4..d9bfde9b 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
<p align="center">
<img alt="Alacritty - A fast, cross-platform, OpenGL terminal emulator"
- src="extra/promo/alacritty-readme.png">
+ src="https://raw.githubusercontent.com/alacritty/alacritty/master/extra/promo/alacritty-readme.png">
</p>
## About
diff --git a/alacritty/Cargo.toml b/alacritty/Cargo.toml
index f144e578..919394fb 100644
--- a/alacritty/Cargo.toml
+++ b/alacritty/Cargo.toml
@@ -43,7 +43,7 @@ tempfile = "3.12.0"
toml = "0.8.2"
toml_edit = "0.22.21"
unicode-width = "0.1"
-winit = { version = "0.30.7", default-features = false, features = ["rwh_06", "serde"] }
+winit = { version = "0.30.8", default-features = false, features = ["rwh_06", "serde"] }
[build-dependencies]
gl_generator = "0.14.0"
diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs
index 79f31eef..2ac6279d 100644
--- a/alacritty/src/event.rs
+++ b/alacritty/src/event.rs
@@ -1183,17 +1183,13 @@ impl<'a, N: Notify + 'a, T: EventListener> input::ActionContext<T> for ActionCon
/// Expand the selection to the current mouse cursor position.
#[inline]
fn expand_selection(&mut self) {
+ let control = self.modifiers().state().control_key();
let selection_type = match self.mouse().click_state {
- ClickState::Click => {
- if self.modifiers().state().control_key() {
- SelectionType::Block
- } else {
- SelectionType::Simple
- }
- },
+ ClickState::None => return,
+ _ if control => SelectionType::Block,
+ ClickState::Click => SelectionType::Simple,
ClickState::DoubleClick => SelectionType::Semantic,
ClickState::TripleClick => SelectionType::Lines,
- ClickState::None => return,
};
// Load mouse point, treating message bar and padding as the closest cell.
diff --git a/alacritty/src/input/keyboard.rs b/alacritty/src/input/keyboard.rs
index 85734109..af9bfbb2 100644
--- a/alacritty/src/input/keyboard.rs
+++ b/alacritty/src/input/keyboard.rs
@@ -218,20 +218,15 @@ impl<T: EventListener, A: ActionContext<T>> Processor<T, A> {
let text = key.text_with_all_modifiers().unwrap_or_default();
let mods = if self.alt_send_esc(&key, text) { mods } else { mods & !ModifiersState::ALT };
- let bytes: Cow<'static, [u8]> = match key.logical_key.as_ref() {
- // NOTE: Echo the key back on release to follow kitty/foot behavior. When
- // KEYBOARD_REPORT_ALL_KEYS_AS_ESC is used, we build proper escapes for
- // the keys below.
- _ if mode.contains(TermMode::REPORT_ALL_KEYS_AS_ESC) => {
- build_sequence(key, mods, mode).into()
+ let bytes = match key.logical_key.as_ref() {
+ Key::Named(NamedKey::Enter)
+ | Key::Named(NamedKey::Tab)
+ | Key::Named(NamedKey::Backspace)
+ if !mode.contains(TermMode::REPORT_ALL_KEYS_AS_ESC) =>
+ {
+ return
},
- // Winit uses different keys for `Backspace` so we explicitly specify the
- // values, instead of using what was passed to us from it.
- Key::Named(NamedKey::Tab) => [b'\t'].as_slice().into(),
- Key::Named(NamedKey::Enter) => [b'\r'].as_slice().into(),
- Key::Named(NamedKey::Backspace) => [b'\x7f'].as_slice().into(),
- Key::Named(NamedKey::Escape) => [b'\x1b'].as_slice().into(),
- _ => build_sequence(key, mods, mode).into(),
+ _ => build_sequence(key, mods, mode),
};
self.ctx.write_to_pty(bytes);
diff --git a/alacritty/src/input/mod.rs b/alacritty/src/input/mod.rs
index 1c9d6008..60a50529 100644
--- a/alacritty/src/input/mod.rs
+++ b/alacritty/src/input/mod.rs
@@ -637,6 +637,7 @@ impl<T: EventListener, A: ActionContext<T>> Processor<T, A> {
/// Handle left click selection and vi mode cursor movement.
fn on_left_click(&mut self, point: Point) {
let side = self.ctx.mouse().cell_side;
+ let control = self.ctx.modifiers().state().control_key();
match self.ctx.mouse().click_state {
ClickState::Click => {
@@ -646,21 +647,21 @@ impl<T: EventListener, A: ActionContext<T>> Processor<T, A> {
self.ctx.clear_selection();
// Start new empty selection.
- if self.ctx.modifiers().state().control_key() {
+ if control {
self.ctx.start_selection(SelectionType::Block, point, side);
} else {
self.ctx.start_selection(SelectionType::Simple, point, side);
}
},
- ClickState::DoubleClick => {
+ ClickState::DoubleClick if !control => {
self.ctx.mouse_mut().block_hint_launcher = true;
self.ctx.start_selection(SelectionType::Semantic, point, side);
},
- ClickState::TripleClick => {
+ ClickState::TripleClick if !control => {
self.ctx.mouse_mut().block_hint_launcher = true;
self.ctx.start_selection(SelectionType::Lines, point, side);
},
- ClickState::None => (),
+ _ => (),
};
// Move vi mode cursor to mouse click position.
diff --git a/alacritty_terminal/CHANGELOG.md b/alacritty_terminal/CHANGELOG.md
index 28ed7540..a6ee32b2 100644
--- a/alacritty_terminal/CHANGELOG.md
+++ b/alacritty_terminal/CHANGELOG.md
@@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## 0.24.2-dev
+### Added
+
+- Escape sequence to move cursor forward tabs ( CSI Ps I )
+
## 0.24.1
### Changed
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs
index 46b65377..486799cd 100644
--- a/alacritty_terminal/src/term/mod.rs
+++ b/alacritty_terminal/src/term/mod.rs
@@ -1592,11 +1592,15 @@ impl<T: EventListener> Handler for Term<T> {
#[inline]
fn move_backward_tabs(&mut self, count: u16) {
trace!("Moving backward {} tabs", count);
- self.damage_cursor();
let old_col = self.grid.cursor.point.column.0;
for _ in 0..count {
let mut col = self.grid.cursor.point.column;
+
+ if col == 0 {
+ break;
+ }
+
for i in (0..(col.0)).rev() {
if self.tabs[index::Column(i)] {
col = index::Column(i);
@@ -1612,7 +1616,29 @@ impl<T: EventListener> Handler for Term<T> {
#[inline]
fn move_forward_tabs(&mut self, count: u16) {
- trace!("[unimplemented] Moving forward {} tabs", count);
+ trace!("Moving forward {} tabs", count);
+
+ let num_cols = self.columns();
+ let old_col = self.grid.cursor.point.column.0;
+ for _ in 0..count {
+ let mut col = self.grid.cursor.point.column;
+
+ if col == num_cols - 1 {
+ break;
+ }
+
+ for i in col.0 + 1..num_cols {
+ col = index::Column(i);
+ if self.tabs[col] {
+ break;
+ }
+ }
+
+ self.grid.cursor.point.column = col;
+ }
+
+ let line = self.grid.cursor.point.line.0 as usize;
+ self.damage.damage_line(line, old_col, self.grid.cursor.point.column.0);
}
#[inline]
diff --git a/extra/linux/org.alacritty.Alacritty.appdata.xml b/extra/linux/org.alacritty.Alacritty.appdata.xml
index ddfdd281..e99ab8d4 100644
--- a/extra/linux/org.alacritty.Alacritty.appdata.xml
+++ b/extra/linux/org.alacritty.Alacritty.appdata.xml
@@ -1,13 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright 2016-2022 Joe Wilm, The Alacritty Project Contributors -->
+<!-- SPDX-License-Identifier: MIT -->
<component type="desktop-application">
<id>org.alacritty.Alacritty</id>
- <!-- Translators: The application name -->
+
+ <developer_name>Christian Duerr</developer_name>
+ <developer id="org.alacritty">
+ <name>Christian Duerr</name>
+ </developer>
+
<name>Alacritty</name>
- <project_license>APACHE-2.0</project_license>
- <metadata_license>APACHE-2.0</metadata_license>
- <!-- Translators: The application's summary / tagline -->
- <summary>A fast, cross-platform, OpenGL terminal emulator</summary>
+
+ <project_license>Apache-2.0</project_license>
+ <metadata_license>MIT</metadata_license>
+
+ <summary>A cross-platform, OpenGL terminal emulator</summary>
<description>
<p>
Alacritty is a modern terminal emulator that comes with sensible defaults,
@@ -15,19 +21,28 @@
applications, rather than reimplementing their functionality, it manages
to provide a flexible set of features with high performance.
</p>
+ <ul>
+ <li>Wayland native</li>
+ <li>X11 native</li>
+ <li>DE agnostic</li>
+ </ul>
</description>
+
+ <categories>
+ <category>TerminalEmulator</category>
+ </categories>
+
<screenshots>
<screenshot type="default">
- <image>https://user-images.githubusercontent.com/8886672/103264352-5ab0d500-49a2-11eb-8961-02f7da66c855.png</image>
- <caption>Alacritty - A fast, cross-platform, OpenGL terminal emulator</caption>
+ <image>https://raw.githubusercontent.com/alacritty/alacritty/0a1e735cf6b13da1dbe5d161d17c8aa6c1692204/extra/promo/alacritty-readme.png</image>
+ <caption>Alacritty with default theme showing neovim</caption>
</screenshot>
</screenshots>
- <keywords>
- <keyword>terminal emulator</keyword>
- <keyword>GPU</keyword>
- </keywords>
+
<url type="homepage">https://github.com/alacritty/alacritty</url>
<url type="bugtracker">https://github.com/alacritty/alacritty/issues</url>
- <update_contact>https://github.com/alacritty/alacritty/blob/master/CONTRIBUTING.md#contact</update_contact>
- <developer_name>Christian Duerr</developer_name>
+
+ <launchable type="desktop-id">Alacritty.desktop</launchable>
+
+ <content_rating type="oars-1.0" />
</component>