Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Ckath/18df6f3aea10f6cb5b153ca1cff5bcc1 to your computer and use it in GitHub Desktop.
Save Ckath/18df6f3aea10f6cb5b153ca1cff5bcc1 to your computer and use it in GitHub Desktop.
hopefully this is merged in urxvt within the current decade
From c5c4bf378e9dbf546f5615582fb020854bb7bbc2 Mon Sep 17 00:00:00 2001
From: ckath <ckat@teknik.io>
Date: Fri, 8 Jan 2021 14:49:56 +0100
Subject: [PATCH] fix bug where unicode doesnt get parsed in matcher
this was caused by text not being (correctly) decoded, special_decoding
it before matching fixes this
---
src/perl/matcher | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/perl/matcher b/src/perl/matcher
index d991d68a..44fae579 100644
--- a/src/perl/matcher
+++ b/src/perl/matcher
@@ -271,7 +271,7 @@ sub on_line_update {
# fetch the line that has changed
my $line = $self->line ($row);
- my $text = $line->t;
+ my $text = $self->special_decode ($line->t);
my $rend;
# find all urls (if any)
@@ -303,7 +303,7 @@ sub valid_button {
sub find_matches {
my ($self, $row, $col) = @_;
my $line = $self->line ($row);
- my $text = $line->t;
+ my $text = $self->special_decode ($line->t);
my $off = $line->offset_of ($row, $col) if defined $col;
my @matches;
--
2.30.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment