Widgets/TextAreaWidget: Fix clipboard paste cursor with non-ascii chars
This commit is contained in:
parent
99952db736
commit
d3f7e20473
|
|
@ -304,7 +304,7 @@ namespace Nz
|
|||
void TextAreaWidget::PasteFromClipboard(const Vector2ui& targetPosition)
|
||||
{
|
||||
std::size_t glyphCount = ComputeCharacterCount(m_text);
|
||||
std::size_t targetIndex = GetCharacterPosition(m_text, std::min(GetGlyphIndex(targetPosition), glyphCount));
|
||||
std::size_t targetIndex = std::min(GetGlyphIndex(targetPosition), glyphCount);
|
||||
|
||||
std::string clipboardString = Clipboard::GetString();
|
||||
if (clipboardString.empty())
|
||||
|
|
|
|||
Loading…
Reference in New Issue