Improve highlighting structure

- switched to a sparse delta based map
- true lazy-loading to avoid any unneccessary allocations
- fixed windows management api
This commit is contained in:
2026-02-11 18:18:28 +00:00
parent d79ea4e75a
commit 5b66f503e4
24 changed files with 481 additions and 549 deletions

View File

@@ -410,11 +410,10 @@ void Editor::fetch_lsp_hover() {
hover_text += contents.get<std::string>();
}
if (!hover_text.empty()) {
auto hover_box = static_cast<HoverBox *>(ui::hover_popup->tile.get());
hover_box->clear();
hover_box->text = clean_text(hover_text);
hover_box->is_markup = is_markup;
message.editor->hover_active = true;
message.editor->hover_popup->clear();
message.editor->hover_popup->text = clean_text(hover_text);
message.editor->hover_popup->is_markup = is_markup;
message.editor->hover_popup->hidden = false;
}
}
};
@@ -423,12 +422,14 @@ void Editor::fetch_lsp_hover() {
}
void Editor::handle_click(KeyEvent event, Coord size) {
focused_window = this;
layout::focused_window = this;
this->size = size;
static std::chrono::steady_clock::time_point last_click_time =
std::chrono::steady_clock::now();
static uint32_t click_count = 0;
static Coord last_click_pos = {UINT32_MAX, UINT32_MAX};
if (!this->hover_popup->hidden)
this->hover_popup->hidden = true;
if (event.key_type == KEY_MOUSE) {
auto now = std::chrono::steady_clock::now();
auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(