This commit is contained in:
Jacob 2023-09-27 16:55:16 +02:00
parent da75c6f86f
commit 0dc13610c3

View file

@ -468,7 +468,7 @@ int drawinput(int x, int y, int w) {
fh = sp.bh - sp.lrpad / 4; fh = sp.bh - sp.lrpad / 4;
} }
if (passwd) { if (passwd && !hideinput) {
censort = ecalloc(1, sizeof(tx.text)); censort = ecalloc(1, sizeof(tx.text));
for (int i = 0; i < strlen(tx.text); i++) for (int i = 0; i < strlen(tx.text); i++)
@ -481,7 +481,7 @@ int drawinput(int x, int y, int w) {
free(censort); free(censort);
} else if (!passwd) { } else if (!passwd) {
if (strlen(tx.text)) { if (strlen(tx.text) && !hideinput) {
char ptext[BUFSIZ]; char ptext[BUFSIZ];
char *p; char *p;
@ -509,7 +509,7 @@ int drawinput(int x, int y, int w) {
} }
} }
if ((curpos += sp.lrpad / 2 - 1) < w && !hidecaret) { if ((curpos += sp.lrpad / 2 - 1) < w && !hidecaret && !hideinput) {
curpos += fp; curpos += fp;
draw_rect(draw, x + curpos, 2 + (sp.bh - fh) / 2 + y, fw, fh - 4, 1, 0, col_caretfg, col_caretbg, alpha_caretfg, alpha_caretbg); draw_rect(draw, x + curpos, 2 + (sp.bh - fh) / 2 + y, fw, fh - 4, 1, 0, col_caretfg, col_caretbg, alpha_caretfg, alpha_caretbg);
} }
@ -736,10 +736,8 @@ void drawmenu_layer(void) {
x = drawprompt(x, y + (nh ? lines ? itemposition ? (sp.mh - sp.bh) : 0 : 0 : 0), w); x = drawprompt(x, y + (nh ? lines ? itemposition ? (sp.mh - sp.bh) : 0 : 0 : 0), w);
} }
if (!hideinput) {
w = (lines > 0 || !matches) ? sp.mw - x : sp.inputw; w = (lines > 0 || !matches) ? sp.mw - x : sp.inputw;
x = drawinput(x, y + (nh ? lines ? itemposition ? (sp.mh - sp.bh) : 0 : 0 : 0), w); x = drawinput(x, y + (nh ? lines ? itemposition ? (sp.mh - sp.bh) : 0 : 0 : 0), w);
}
// draw the items, this function also calls drawrarrow() and drawlarrow() // draw the items, this function also calls drawrarrow() and drawlarrow()
if (!hideitem) { if (!hideitem) {