~strahinja/poe

17a47e898885fe75d29b3e964e5ecacc343e47ed — Страхиња Радић 4 months ago e8146eb v1.4.1
Adjust line length drawing in edit box

Signed-off-by: Страхиња Радић <contact@strahinja.org>
1 files changed, 2 insertions(+), 2 deletions(-)

M draw.c
M draw.c => draw.c +2 -2
@@ 628,7 628,7 @@ draw_editbox(const struct DrawState* state)
			u32_draw_string(startx + 1, starty + 1 + i,
				curline->fg == 0 ? fg : curline->fg,
				curline->bg == 0 ? bg : curline->bg,
				curline->text, w - 2, w - 2, 1, 1, LEFT,
				curline->text, w - 1, w - 1, 1, 1, LEFT,
				state->info_first_shown_column, 1, NULL, 0, 0);
	}



@@ 656,7 656,7 @@ draw_editbox(const struct DrawState* state)
		dlen = display_length(state, curline->text, curline->length);
		if (dlen > state->input_first_shown_column)
			u32_draw_string(startx + 1, endy - h / 2 - 1 + i, fg,
				bg, curline->text, w - 2, w - 2, 1, 1, LEFT,
				bg, curline->text, w - 1, w - 1, 1, 1, LEFT,
				state->input_first_shown_column, 1, NULL, 0, 0);
	}