mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-08 21:25:32 +02:00
Add url_excluded_characters option to exclude characters from URLs.
This option, like select_by_word_characters, is a set of characters, but for which to *exclude* from URL parsing. See https://github.com/kovidgoyal/kitty/issues/3688#issuecomment-862711148.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "data-types.h"
|
||||
#include "state.h"
|
||||
#define VS15 1285
|
||||
#define VS16 1286
|
||||
|
||||
@@ -13,6 +14,8 @@ combining_type mark_for_codepoint(char_type c);
|
||||
|
||||
static inline bool
|
||||
is_url_char(uint32_t ch) {
|
||||
for (size_t i = 0; i < OPT(url_excluded_characters_count); i++)
|
||||
if (ch == OPT(url_excluded_characters)[i]) return false;
|
||||
return ch && !is_CZ_category(ch);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user