summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Betts <anders.betts@gmail.com>2026-09-19 21:30:13 +0200
committerAnders Betts <anders.betts@gmail.com>2026-09-19 21:30:13 +0200
commit34fc2b1dce788fbb093e70c2124630167e7980ef (patch)
tree49dbf0f450f29a6e7e937b43a1e0f1010c5b00d3
parentbeb52c4a2ca23f29dc992e145810a47241c7d43b (diff)
downloadbokf-34fc2b1dce788fbb093e70c2124630167e7980ef.tar.gz
bokf-34fc2b1dce788fbb093e70c2124630167e7980ef.zip
bokftui: clear the whole prompt line before drawing the labelv0.1.35
-rw-r--r--clients/bokftui.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/clients/bokftui.c b/clients/bokftui.c
index ade7948..9ee5859 100644
--- a/clients/bokftui.c
+++ b/clients/bokftui.c
@@ -371,6 +371,8 @@ static char *date_prompt(const char *label, const char *def)
static char buf[16];
snprintf(buf, sizeof buf, "%s", def ? def : "");
int y = LINES - 3;
+ move(y, 2);
+ clrtoeol();
attron(A_BOLD);
mvaddstr(y, 2, label);
attroff(A_BOLD);
@@ -533,11 +535,11 @@ static char *prompt(const char *label, const char *def, int mask)
static char buf[512];
snprintf(buf, sizeof buf, "%s", def ? def : "");
int y = LINES - 3;
+ move(y, 2);
+ clrtoeol();
attron(A_BOLD);
mvaddstr(y, 2, label);
attroff(A_BOLD);
- move(y, (int)strlen(label) + 3);
- clrtoeol();
refresh();
int prev = curs_set(1);
int rc = edit_field(y, (int)strlen(label) + 3, buf, sizeof buf, mask);