Rewrite diagnostics popup with new api

This commit is contained in:
2026-02-11 19:51:45 +00:00
parent 5b66f503e4
commit e9d164d769
10 changed files with 239 additions and 231 deletions
+3 -4
View File
@@ -45,14 +45,13 @@ void Parser::work() {
if (!editor || !editor->root)
return;
std::vector<uint32_t> batch;
uint32_t c_line;
uint32_t line_count = editor->root->line_count + 1;
for (uint32_t i = MAX(0, (int64_t)scroll_max - MAX_LINES_LOOKBEHIND);
i <= scroll_max + 10 && i < line_count; ++i) {
int64_t start = MIN(scroll_max + 10, line_count - 1);
int64_t end = MAX(0, (int64_t)scroll_max - MAX_LINES_LOOKBEHIND);
for (int64_t i = start; i >= end; --i) {
auto l_opt = line_map.at(i);
if (!l_opt || (l_opt && !l_opt->out_state))
batch.push_back(i);
i++;
}
for (uint32_t c_line : batch) {
if (!running.load(std::memory_order_relaxed))