Bump highlight limits
This commit is contained in:
@@ -28,7 +28,7 @@ Editor *new_editor(const char *filename, Coord position, Coord size) {
|
|||||||
editor->root = load(str, len, optimal_chunk_size(len));
|
editor->root = load(str, len, optimal_chunk_size(len));
|
||||||
free(str);
|
free(str);
|
||||||
editor->folded.resize(editor->root->line_count + 2);
|
editor->folded.resize(editor->root->line_count + 2);
|
||||||
if (len < (1024 * 128)) {
|
if (len <= (1024 * 128)) {
|
||||||
editor->parser = ts_parser_new();
|
editor->parser = ts_parser_new();
|
||||||
Language language = language_for_file(filename);
|
Language language = language_for_file(filename);
|
||||||
editor->language = language.fn();
|
editor->language = language.fn();
|
||||||
|
|||||||
@@ -126,6 +126,8 @@ static inline bool ts_predicate(TSQuery *query, const TSQueryMatch &match,
|
|||||||
ts_query_predicates_for_pattern(query, match.pattern_index, &step_count);
|
ts_query_predicates_for_pattern(query, match.pattern_index, &step_count);
|
||||||
if (!steps || step_count != 4)
|
if (!steps || step_count != 4)
|
||||||
return true;
|
return true;
|
||||||
|
if (source->char_count >= (1024 * 64))
|
||||||
|
return false;
|
||||||
std::string command;
|
std::string command;
|
||||||
std::string regex_txt;
|
std::string regex_txt;
|
||||||
uint32_t subject_id = 0;
|
uint32_t subject_id = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user