Don't set word_characters to select_by_word_characters when empty string
This allows you to pass in --word-characters "" which will make hints only match \w.
This commit is contained in:
parent
0196920533
commit
681fe7f2f2
@ -315,7 +315,7 @@ def functions_for(args: HintsCLIOptions) -> Tuple[str, List[PostprocessorFunc]]:
|
||||
pattern = '[0-9a-f]{7,128}'
|
||||
elif args.type == 'word':
|
||||
chars = args.word_characters
|
||||
if not chars:
|
||||
if chars is None:
|
||||
chars = kitty_common_opts()['select_by_word_characters']
|
||||
pattern = r'(?u)[{}\w]{{{},}}'.format(escape(chars), args.minimum_match_length)
|
||||
post_processors.extend((brackets, quotes))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user