Update imgui color text edit to a179931d.

This commit is contained in:
Bartosz Taudul 2019-05-09 18:56:13 +02:00
parent 273a874de9
commit 9051b6e206

View File

@ -938,6 +938,9 @@ void TextEditor::EnterCharacter(Char aChar, bool aShift)
end.mColumn = (int)mLines[end.mLine].size();
}
if (end.mColumn >= (int)mLines[end.mLine].size())
end.mColumn = (int)mLines[end.mLine].size() - 1;
u.mRemovedStart = start;
u.mRemovedEnd = end;
u.mRemoved = GetText(start, end);
@ -981,6 +984,8 @@ void TextEditor::EnterCharacter(Char aChar, bool aShift)
if (modified)
{
assert(mLines.size() > start.mLine && mLines[start.mLine].size() > start.mColumn);
assert(mLines.size() > end.mLine && mLines[end.mLine].size() > end.mColumn);
u.mAddedStart = start;
u.mAddedEnd = end;
u.mAdded = GetText(start, end);
@ -1952,7 +1957,6 @@ void TextEditor::ColorizeInternal()
}
}
mCheckComments = false;
return;
}
if (mColorRangeMin < mColorRangeMax)