Even better, scrolling

This commit is contained in:
James Johnson 2018-01-11 09:19:02 -05:00
parent 64dab5989e
commit ad6d547812
1 changed files with 7 additions and 1 deletions

View File

@ -3468,6 +3468,12 @@ class EditBox : EditWidgetBase {
if (_contentChanged) if (_contentChanged)
needRewrap = true; needRewrap = true;
if (lastStartingLine != _firstVisibleLine)
{
needRewrap = true;
lastStartingLine = _firstVisibleLine;
}
if (rc.width <= 0 && _wordWrap) if (rc.width <= 0 && _wordWrap)
{ {
return; return;
@ -3520,7 +3526,7 @@ class EditBox : EditWidgetBase {
CustomCharProps[] wrapProps; CustomCharProps[] wrapProps;
foreach (int q, curWrap; wrappedLine) foreach (int q, curWrap; wrappedLine)
{ {
auto lineOffset = q + i + wrapsUpTo(i); auto lineOffset = q + i + wrapsUpTo(i + _firstVisibleLine);
if (highlight) if (highlight)
{ {
wrapProps = highlight[accumulativeLength .. $]; wrapProps = highlight[accumulativeLength .. $];