diff options
-rw-r--r-- | src/ui/inputwidget.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index e65af417..b51b3985 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c | |||
@@ -1448,10 +1448,10 @@ static void draw_InputWidget_(const iInputWidget *d) { | |||
1448 | const iString * text = &curLine->text; | 1448 | const iString * text = &curLine->text; |
1449 | /* The `gap_UI` offsets below are a hack. They are used because for some reason the | 1449 | /* The `gap_UI` offsets below are a hack. They are used because for some reason the |
1450 | cursor rect and the glyph inside don't quite position like during `run_Text_()`. */ | 1450 | cursor rect and the glyph inside don't quite position like during `run_Text_()`. */ |
1451 | const iInt2 prefixSize = measureN_Text(d->font, cstr_String(text), d->cursor - curLine->offset).bounds.size; | 1451 | const int prefixSize = measureN_Text(d->font, cstr_String(text), d->cursor - curLine->offset).advance.x; |
1452 | const iInt2 curPos = addX_I2(addY_I2(contentBounds.pos, lineHeight_Text(d->font) * d->cursorLine), | 1452 | const iInt2 curPos = addX_I2(addY_I2(contentBounds.pos, lineHeight_Text(d->font) * d->cursorLine), |
1453 | prefixSize.x + | 1453 | prefixSize + |
1454 | (d->mode == insert_InputMode ? -curSize.x / 2 : 0)); | 1454 | (d->mode == insert_InputMode ? -curSize.x / 2 : 0)); |
1455 | const iRect curRect = { curPos, curSize }; | 1455 | const iRect curRect = { curPos, curSize }; |
1456 | fillRect_Paint(&p, curRect, uiInputCursor_ColorId); | 1456 | fillRect_Paint(&p, curRect, uiInputCursor_ColorId); |
1457 | if (d->mode == overwrite_InputMode) { | 1457 | if (d->mode == overwrite_InputMode) { |