From 87b9d2a4780e9ee046f3281b6e8722498582ca0d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 13 Jan 2017 11:45:41 +0530 Subject: [PATCH] Also match unicode alpha-numberic characters when double clicking --- kitty/char_grid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty/char_grid.py b/kitty/char_grid.py index 580c8ce67..ab7ea6cd4 100644 --- a/kitty/char_grid.py +++ b/kitty/char_grid.py @@ -400,10 +400,10 @@ class CharGrid: s.end_x = self.screen.columns - 1 elif count == 2: i = x - alphanumeric = 'A-Za-z0-9' + alphanumeric = r'\w' optionalchars = re.escape(self.opts.select_by_word_characters) pattern = alphanumeric + optionalchars - pat = re.compile(r'['+pattern+']+') + pat = re.compile(r'['+pattern+']+', re.UNICODE) while i >= 0 and pat.match(line[i]) is not None: i -= 1 s.start_x = i if i == x else i + 1