Skip to content

Commit

Permalink
autopairs-removal: limit to one-char selections
Browse files Browse the repository at this point in the history
  • Loading branch information
Houkime committed Jul 2, 2022
1 parent e7e591e commit 005f4c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2999,7 +2999,9 @@ pub mod insert {
auto_pairs,
) {
(Some(_x), Some(_y), Some(ap))
if ap.get(_x).is_some() && (ap.get(_x).unwrap().close == _y) =>
if range.len() == 1
&& ap.get(_x).is_some()
&& ap.get(_x).unwrap().close == _y =>
// delete both autopaired characters
{
(
Expand Down

0 comments on commit 005f4c6

Please sign in to comment.