Major updates/cleanup.

This commit is contained in:
2026-09-08 07:00:13 +01:00
parent 0df03f418a
commit 0760209417
23 changed files with 668 additions and 441 deletions
+14 -6
View File
@@ -1,23 +1,31 @@
#pragma once
#include "definitions.h"
#include "internal/syntax/miniparser.h"
#include "pch.h"
namespace bed::internal::ui {
namespace bed::internal::ui::text_mode {
struct TextMode {
std::string cmd;
uint16_t cursor;
struct Row {
uint64_t start;
uint64_t length;
};
using Lines = std::vector<Row>;
vase::Shard *vase;
vase::Point cursor;
std::optional<syntax::MiniParser> parser;
std::vector<Lines> lines;
uint16_t start;
uint16_t height;
uint16_t term_height;
uint16_t term_width;
BEd &bed;
TextMode(BEd &);
TextMode(BEd &, vase::Shard *, syntax::Language *, void *);
std::pair<vase::Shard *, bool> run();
std::pair<vase::Shard *, bool> run_pipe();
std::pair<vase::Shard *, bool> run_terminal();
void grow();
void redraw();
void layout_lines();
};
} // namespace bed::internal::ui
} // namespace bed::internal::ui::text_mode