Add x function and other bug fixes.

This commit is contained in:
2026-08-31 12:56:14 +01:00
parent c0f9c6a234
commit 569b69263a
11 changed files with 328 additions and 43 deletions
+6 -1
View File
@@ -123,9 +123,14 @@ std::pair<vase::Shard *, bool> TextMode::run() {
cursor = cmd.size();
running = false;
}
if (cmd.size() == 2 && cmd.compare(0, 2, ".\n") == 0) {
cmd.clear();
cursor = 0;
running = false;
}
}
size_t total_lines = 1 + std::count(cmd.begin(), cmd.end(), '\n');
size_t total_lines = cmd.size() ? 1 + std::count(cmd.begin(), cmd.end(), '\n') : 0;
uint16_t last_row = start + total_lines;
bed.io.move_cursor(last_row, 1);
bed.io.write("\n", 1);