mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
Fix assertion when checking if change in selection
The check for the iterator being in the same paragraph as the end of selection was incorrect, because paragraphs in different cells could have the same pit. We now additionally condition on having the same idx. This commit amendsd1279875
(and thus23de5e5e
). For discussion, see: https://www.mail-archive.com/search?l=mid&q=a5afd0c01a0eb9a84fd4d050d15eb23016d6f38a.camel%40lyx.org Thanks to Jürgen.
This commit is contained in:
parent
f4046a89a0
commit
c5301a6495
@ -3233,7 +3233,8 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
for (DocIterator it = cur.selectionBegin(); ; it.forwardPar()) {
|
for (DocIterator it = cur.selectionBegin(); ; it.forwardPar()) {
|
||||||
pos_type const beg = it.pos();
|
pos_type const beg = it.pos();
|
||||||
pos_type end;
|
pos_type end;
|
||||||
bool const in_last_par = (it.pit() == cur.selectionEnd().pit());
|
bool const in_last_par = (it.pit() == cur.selectionEnd().pit() &&
|
||||||
|
it.idx() == cur.selectionEnd().idx());
|
||||||
if (in_last_par)
|
if (in_last_par)
|
||||||
end = cur.selectionEnd().pos();
|
end = cur.selectionEnd().pos();
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user