Fixed enumerating of Text::String with clickable monospace.

This commit is contained in:
23rd 2022-01-15 12:51:49 +03:00
parent d7b3a68351
commit 2b87a251cd

View file

@ -3276,6 +3276,9 @@ void String::enumerateText(TextSelection selection, AppendPartCallback appendPar
uint16 blockFrom = (i == e) ? _text.size() : (*i)->from();
int32 blockFlags = (i == e) ? 0 : (*i)->flags();
if (IsMono(blockFlags)) {
blockLnkIndex = 0;
}
if (blockLnkIndex && !_links.at(blockLnkIndex - 1)) { // ignore empty links
blockLnkIndex = 0;
}