Rewrite diagnostics popup with new api
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user