Fix selection of monospace text on press.
This commit is contained in:
parent
7d3f27b7ca
commit
4fbd226067
1 changed files with 6 additions and 7 deletions
|
|
@ -2639,6 +2639,7 @@ private:
|
||||||
eSetFont(block);
|
eSetFont(block);
|
||||||
if (_p) {
|
if (_p) {
|
||||||
const auto isMono = IsMono(block->flags());
|
const auto isMono = IsMono(block->flags());
|
||||||
|
_background = {};
|
||||||
if (block->spoilerIndex()) {
|
if (block->spoilerIndex()) {
|
||||||
const auto handler
|
const auto handler
|
||||||
= _t->_spoilers.at(block->spoilerIndex() - 1);
|
= _t->_spoilers.at(block->spoilerIndex() - 1);
|
||||||
|
|
@ -2663,14 +2664,12 @@ private:
|
||||||
*_background.color);
|
*_background.color);
|
||||||
mutableCache.color = (*_background.color)->c;
|
mutableCache.color = (*_background.color)->c;
|
||||||
}
|
}
|
||||||
} else if (isMono && block->lnkIndex()) {
|
|
||||||
_background = {
|
|
||||||
.selectActiveBlock = ClickHandler::showAsPressed(
|
|
||||||
_t->_links.at(block->lnkIndex() - 1)),
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
_background = {};
|
|
||||||
}
|
}
|
||||||
|
if (isMono && block->lnkIndex() && !_background.inFront) {
|
||||||
|
_background.selectActiveBlock = ClickHandler::showAsPressed(
|
||||||
|
_t->_links.at(block->lnkIndex() - 1));
|
||||||
|
}
|
||||||
|
|
||||||
if (isMono) {
|
if (isMono) {
|
||||||
_currentPen = &_textPalette->monoFg->p;
|
_currentPen = &_textPalette->monoFg->p;
|
||||||
_currentPenSelected = &_textPalette->selectMonoFg->p;
|
_currentPenSelected = &_textPalette->selectMonoFg->p;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue