From 12cc45bfcaa4c866f4509b6324a424048f3ddd29 Mon Sep 17 00:00:00 2001 From: pommicket Date: Fri, 29 Jul 2022 16:05:56 -0400 Subject: fix reloading with text-size --- syntax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'syntax.c') diff --git a/syntax.c b/syntax.c index 97d0554..3b477e9 100644 --- a/syntax.c +++ b/syntax.c @@ -1090,7 +1090,7 @@ static void syntax_highlight_javascript(SyntaxState *state, char32_t const *line // this is not foolproof for detecting regex literals // but should handle all "reasonable" uses of regex. bool is_regex = i == 0 // slash is first char in line - || (line[i-1] <= WCHAR_MAX && iswspace(line[i-1])) // slash preceded by space + || (line[i-1] <= WCHAR_MAX && iswspace((wint_t)line[i-1])) // slash preceded by space || (line[i-1] <= 128 && strchr(";({[=,:", (char)line[i-1])); // slash preceded by any of these characters if (is_regex) { in_string = true; -- cgit v1.2.3