From 2291610f72d5fabbdd60ca080cc305301f0306f9 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Wed, 14 Dec 2022 17:21:25 +0000 Subject: 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. --- CHANGELOG.md | 1 + alacritty_terminal/src/selection.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 { -- cgit