diff options
Diffstat (limited to 'src/ui/inputwidget.c')
-rw-r--r-- | src/ui/inputwidget.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index 3572d043..d62bc77e 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c | |||
@@ -711,10 +711,11 @@ static void startOrStopCursorTimer_InputWidget_(iInputWidget *d, iBool doStart) | |||
711 | static void updateAllLinesAndResizeHeight_InputWidget_(iInputWidget *d) { | 711 | static void updateAllLinesAndResizeHeight_InputWidget_(iInputWidget *d) { |
712 | /* Rewrap the buffered text and resize accordingly. */ | 712 | /* Rewrap the buffered text and resize accordingly. */ |
713 | iWrapText wt = wrap_InputWidget_(d, 0); | 713 | iWrapText wt = wrap_InputWidget_(d, 0); |
714 | /* TODO: Set max lines limit for WrapText. */ | ||
714 | const int height = measure_WrapText(&wt, d->font).bounds.size.y; | 715 | const int height = measure_WrapText(&wt, d->font).bounds.size.y; |
715 | /* We use this to store the number wrapped lines for determining widget height. */ | 716 | /* We use this to store the number wrapped lines for determining widget height. */ |
716 | d->visWrapLines.start = 0; | 717 | d->visWrapLines.start = 0; |
717 | d->visWrapLines.end = height / lineHeight_Text(d->font); | 718 | d->visWrapLines.end = iMin(d->maxWrapLines, height / lineHeight_Text(d->font)); |
718 | updateMetrics_InputWidget_(d); | 719 | updateMetrics_InputWidget_(d); |
719 | } | 720 | } |
720 | 721 | ||