Move folder

This commit is contained in:
2026-04-13 10:32:46 +01:00
parent c683754d49
commit 037f884050
107 changed files with 292 additions and 155 deletions

18
include/editor/editor.h Normal file → Executable file
View File

@@ -1,7 +1,9 @@
#ifndef EDITOR_H
#define EDITOR_H
#include "editor/hooks.h"
#include "editor/indents.h"
#include "editor/visual.h"
#include "extentions/diagnostics.h"
#include "extentions/hover.h"
#include "io/knot.h"
@@ -31,7 +33,6 @@ struct Editor : Window {
Coord size = {0, 0};
Coord scroll = {0, 0};
Language lang = {};
uint32_t hooks[94] = {0};
bool jumper_set = false;
std::vector<VWarn> warnings = {};
bool warnings_dirty = false;
@@ -42,6 +43,7 @@ struct Editor : Window {
DiagnosticBox *diagnostic_popup = init_diagnostic();
std::atomic<int> lsp_version = 1;
IndentationEngine indents = {};
HookEngine hooks = {};
Parser *parser = nullptr;
ExtraHighlighter extra_hl = {};
bool is_css_color = false;
@@ -84,7 +86,6 @@ struct Editor : Window {
void backspace_edit();
void delete_prev_word();
void delete_next_word();
void clear_hooks_at_line(uint32_t line);
void cursor_prev_word();
void cursor_next_word();
void select_all();
@@ -158,19 +159,6 @@ struct Editor : Window {
free(it->buffer);
free(it);
}
inline void apply_hook_insertion(uint32_t line, uint32_t rows) {
for (auto &hook : this->hooks)
if (hook > line)
hook += rows;
}
inline void apply_hook_deletion(uint32_t removal_start,
uint32_t removal_end) {
for (auto &hook : this->hooks)
if (hook > removal_start)
hook -= removal_end - removal_start + 1;
}
};
#endif