fix(ui): custom input not taking all width

This commit is contained in:
javalsai 2025-06-21 05:25:03 +02:00
parent 8403bfc26c
commit 6ddbb407da
Signed by: javalsai
SSH Key Fingerprint: SHA256:3G83yKhBUWVABVX/vPWH88xnK4+ptMtHkZGCRXD4Mk8

View File

@ -116,9 +116,12 @@ void ui_update_cursor_focus() {
u_char col = bstart.x + VALUES_COL; u_char col = bstart.x + VALUES_COL;
struct opts_field* ofield = get_opts_ffield(); struct opts_field* ofield = get_opts_ffield();
col += ofield_display_cursor_col( u_char maxlen = VALUE_MAXLEN;
ofield, VALUE_MAXLEN - utf8len(g_config->strings.opts_pre) - if (ofield->opts > 1) {
utf8len(g_config->strings.opts_post)); maxlen -= utf8len(g_config->strings.opts_pre) +
utf8len(g_config->strings.opts_post);
}
col += ofield_display_cursor_col(ofield, maxlen);
if (ofield->opts > 1) col += utf8len(g_config->strings.opts_pre); if (ofield->opts > 1) col += utf8len(g_config->strings.opts_pre);
// rows in here quite bodged // rows in here quite bodged