Fix input select going out of bound

This commit is contained in:
Nemirtingas
2019-08-03 13:44:33 +02:00
parent 4f9e67d700
commit 804355fa54
2 changed files with 11 additions and 0 deletions

View File

@ -3097,6 +3097,12 @@ static ImVec2 InputTextCalcTextSizeW(const ImWchar* text_begin, const ImWchar* t
if (c == '\r')
continue;
if (*s == 1)
{
s += 9;
continue;
}
const float char_width = font->GetCharAdvance((ImWchar)c) * scale;
line_width += char_width;
}