diff options
author | Christian Duerr <contact@christianduerr.com> | 2022-12-14 17:21:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-14 20:21:25 +0300 |
commit | 2291610f72d5fabbdd60ca080cc305301f0306f9 (patch) | |
tree | be6528d58a9772dccfa932c597b7e28b823e9f0f | |
parent | 507f727768079addd7546a9ef67aa28a3f05ad62 (diff) | |
download | alacritty-2291610f72d5fabbdd60ca080cc305301f0306f9.tar.gz alacritty-2291610f72d5fabbdd60ca080cc305301f0306f9.zip |
Fix multi-line bracket selection
This fixes a bug where semantic selection for bracket characters wasn't
working properly over multiple lines since start and end of the
selection were swapped.
Closes #6567.
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | alacritty_terminal/src/selection.rs | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 35fa92b8..483456e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Mouse cursor staying hidden after window regains focus on macOS Ventura - Blurry fonts when changing padding size at runtime - Crash while typing on Wayland +- Multi-line semantic bracket selection ## 0.11.0 diff --git a/alacritty_terminal/src/selection.rs b/alacritty_terminal/src/selection.rs index 97a80ec3..542430d3 100644 --- a/alacritty_terminal/src/selection.rs +++ b/alacritty_terminal/src/selection.rs @@ -298,7 +298,7 @@ impl Selection { if start == end { if let Some(matching) = term.bracket_search(start) { if (matching.line == start.line && matching.column < start.column) - || (matching.line > start.line) + || (matching.line < start.line) { start = matching; } else { |