Fix initial InputField text setting.

After stargin to merge block format to current cursor the
_lastTextWithTags was cleared before being set from the same reference.
This commit is contained in:
John Preston 2024-05-13 10:32:54 +04:00
parent 19193b3c7b
commit 3aeeec3dfc

View file

@ -1341,8 +1341,8 @@ InputField::InputField(
setCursor(style::cur_text);
heightAutoupdated();
if (!_lastTextWithTags.text.isEmpty()) {
setTextWithTags(_lastTextWithTags, HistoryAction::Clear);
if (!value.text.isEmpty()) {
setTextWithTags(value, HistoryAction::Clear);
}
startBorderAnimation();