#pragma once #include "internal/syntax/miniparser.h" #include "pch.h" namespace bed::internal::ui::text_mode { struct TextMode { struct Row { uint64_t start; uint64_t length; }; using Lines = std::vector; vase::Shard *vase; vase::Point cursor; std::optional parser; std::vector lines; uint16_t start; uint16_t height; uint16_t term_height; uint16_t term_width; BEd &bed; TextMode(BEd &, vase::Shard *, syntax::Language *, void *); std::pair run(); std::pair run_pipe(); std::pair run_terminal(); void grow(); void redraw(); void layout_lines(); }; } // namespace bed::internal::ui::text_mode