mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-06 16:05:05 +02:00
hints: fix select by word broken while porting to Go
This commit is contained in:
@@ -258,7 +258,8 @@ func functions_for(opts *Options) (pattern string, post_processors []PostProcess
|
||||
chars = RelevantKittyOpts().Select_by_word_characters
|
||||
}
|
||||
chars = regexp.QuoteMeta(chars)
|
||||
pattern = fmt.Sprintf(`(?u)[%s\pL\pN]{%d,}`, chars, opts.MinimumMatchLength)
|
||||
chars = strings.ReplaceAll(chars, "-", "\\-")
|
||||
pattern = fmt.Sprintf(`[%s\pL\pN]{%d,}`, chars, opts.MinimumMatchLength)
|
||||
post_processors = append(post_processors, PostProcessorMap()["brackets"], PostProcessorMap()["quotes"])
|
||||
default:
|
||||
pattern = opts.Regex
|
||||
|
||||
Reference in New Issue
Block a user