commit a82a85ee8653dd5fad64e3b1df1e457b0f008f78
parent 53e51a977079b3779305182374fe4d935ced4de8
Author: Andrew Laack <andrew@laack.co>
Date: Fri, 25 Sep 2026 18:48:36 -0500
Support for showing input
Diffstat:
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/TODO.txt b/TODO.txt
@@ -34,4 +34,3 @@
- horizontal scroll when lines are too long?
- make unordered list items indent correctly
- first line is normal, subsequent lines should have 2 spaces prefixing them
-- show prompt for inputs from metaline.
diff --git a/src/main.cpp b/src/main.cpp
@@ -194,7 +194,12 @@ void draw(DrawState& ds) {
}
if(ds.handleInput) {
- drawInputBox("Input: ", ds.userInput);
+ if(ds.metaLine != "") {
+ drawInputBox(ds.metaLine + ": ", ds.userInput);
+ } else {
+ drawInputBox("Input: ", ds.userInput);
+
+ }
}
if (ds.handleOpenOther) {
@@ -413,6 +418,11 @@ int main(int argc, char** argv) {
}
if(b.getCurrentSite()->getStatusCode() >= 10 && b.getCurrentSite()->getStatusCode() <= 19) {
+ auto* st = b.getCurrentSite();
+ if(st != nullptr) {
+ ds.metaLine = st->getMeta();
+ }
+
std::string inputQuery = handleUserInput(ds);
if(inputQuery != "?") { // TODO: Better handling
b.goToSite(inputQuery,true);