diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-12-07 14:01:05 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-12-07 14:01:05 +0200 |
commit | f09b3f74dc512ee2fc09cba43c4ee7f07b895d90 (patch) | |
tree | 4415946c4d760a3f7545118315440b2ecd2b41f7 /src/ui/text.c | |
parent | 39dfbe85259d2e67b355a6a840ce47e06474202c (diff) |
InputWidget: Buffered content is limited by max height
Diffstat (limited to 'src/ui/text.c')
-rw-r--r-- | src/ui/text.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ui/text.c b/src/ui/text.c index 76a1ee19..94569a6a 100644 --- a/src/ui/text.c +++ b/src/ui/text.c | |||
@@ -1406,6 +1406,7 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) { | |||
1406 | iBool isFirst = iTrue; | 1406 | iBool isFirst = iTrue; |
1407 | const iBool checkHitPoint = wrap && !isEqual_I2(wrap->hitPoint, zero_I2()); | 1407 | const iBool checkHitPoint = wrap && !isEqual_I2(wrap->hitPoint, zero_I2()); |
1408 | const iBool checkHitChar = wrap && wrap->hitChar; | 1408 | const iBool checkHitChar = wrap && wrap->hitChar; |
1409 | size_t numWrapLines = 0; | ||
1409 | while (!isEmpty_Range(&wrapRuns)) { | 1410 | while (!isEmpty_Range(&wrapRuns)) { |
1410 | if (isFirst) { | 1411 | if (isFirst) { |
1411 | isFirst = iFalse; | 1412 | isFirst = iFalse; |
@@ -1635,6 +1636,10 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) { | |||
1635 | iRound(wrapAdvance))) { | 1636 | iRound(wrapAdvance))) { |
1636 | willAbortDueToWrap = iTrue; | 1637 | willAbortDueToWrap = iTrue; |
1637 | } | 1638 | } |
1639 | numWrapLines++; | ||
1640 | if (wrap && wrap->maxLines && numWrapLines == wrap->maxLines) { | ||
1641 | willAbortDueToWrap = iTrue; | ||
1642 | } | ||
1638 | wrapAttrib = lastAttrib; | 1643 | wrapAttrib = lastAttrib; |
1639 | xCursor = origin; | 1644 | xCursor = origin; |
1640 | /* We have determined a possible wrap position and alignment for the work runs, | 1645 | /* We have determined a possible wrap position and alignment for the work runs, |