Move folder
This commit is contained in:
18
include/editor/editor.h
Normal file → Executable file
18
include/editor/editor.h
Normal file → Executable 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
|
||||
|
||||
Reference in New Issue
Block a user