diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-08-02 10:27:24 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-08-02 10:27:24 +0300 |
commit | edebcda032c18fcfda566b415aae6107f0dcd31a (patch) | |
tree | 48690a9a93bf5f824531cf12c9ff3ea7b4649354 | |
parent | 7b4d50f2085322ec19b2c5fe257f1d0290339e0d (diff) |
InputWidget: Simple text renderer needs fixing
-rw-r--r-- | src/ui/inputwidget.c | 1 | ||||
-rw-r--r-- | src/ui/text_simple.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index 6246078e..7786cf22 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c | |||
@@ -776,6 +776,7 @@ static iRangei visibleLineRange_InputWidget_(const iInputWidget *d) { | |||
776 | } | 776 | } |
777 | else break; | 777 | else break; |
778 | } | 778 | } |
779 | iAssert(isEmpty_Range(&vis) || (vis.start >= 0 && vis.end >= vis.start)); | ||
779 | return vis; | 780 | return vis; |
780 | } | 781 | } |
781 | 782 | ||
diff --git a/src/ui/text_simple.c b/src/ui/text_simple.c index b843f2e8..a1b8e859 100644 --- a/src/ui/text_simple.c +++ b/src/ui/text_simple.c | |||
@@ -73,7 +73,7 @@ static iRect runSimple_Font_(iFont *d, const iRunArgs *args) { | |||
73 | const int xposLimit = (wrap && wrap->maxWidth ? orig.x + wrap->maxWidth : 0); | 73 | const int xposLimit = (wrap && wrap->maxWidth ? orig.x + wrap->maxWidth : 0); |
74 | const enum iRunMode mode = args->mode; | 74 | const enum iRunMode mode = args->mode; |
75 | const char * lastWordEnd = args->text.start; | 75 | const char * lastWordEnd = args->text.start; |
76 | iAssert(xposLimit == 0 || isMeasuring_(mode)); | 76 | //iAssert(xposLimit == 0 || isMeasuring_(mode)); |
77 | iAssert(args->text.end >= args->text.start); | 77 | iAssert(args->text.end >= args->text.start); |
78 | if (wrap) { | 78 | if (wrap) { |
79 | wrap->wrapRange_ = args->text; | 79 | wrap->wrapRange_ = args->text; |