mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-25 04:38:23 +00:00
Fix multiline monospace pre blocks editing.
Now we pass current flags and lnkIndex to the NewlineBlock, so that we don't get one multiline pre block split to separate line blocks.
This commit is contained in:
parent
eaf91bba58
commit
148c04fb41
@ -182,7 +182,7 @@ public:
|
||||
emoji = 0;
|
||||
lastSkipped = true;
|
||||
} else if (newline) {
|
||||
_t->_blocks.push_back(new NewlineBlock(_t->_st->font, _t->_text, blockStart, len));
|
||||
_t->_blocks.push_back(new NewlineBlock(_t->_st->font, _t->_text, blockStart, len, flags, lnkIndex));
|
||||
} else {
|
||||
_t->_blocks.push_back(new TextBlock(_t->_st->font, _t->_text, _t->_minResizeWidth, blockStart, len, flags, lnkIndex));
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
NewlineBlock(const style::font &font, const QString &str, uint16 from, uint16 length) : ITextBlock(font, str, from, length, 0, 0), _nextDir(Qt::LayoutDirectionAuto) {
|
||||
NewlineBlock(const style::font &font, const QString &str, uint16 from, uint16 length, uchar flags, uint16 lnkIndex) : ITextBlock(font, str, from, length, flags, lnkIndex), _nextDir(Qt::LayoutDirectionAuto) {
|
||||
_flags |= ((TextBlockTNewline & 0x0F) << 8);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user