mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-22 07:42:02 +00:00
Fix crash when attempting to search in selection that contains only math
This commit is contained in:
parent
281744d24f
commit
cca68d0614
@ -240,7 +240,7 @@ int findForward(DocIterator & cur, DocIterator const endcur,
|
||||
bool find_del = true, bool onlysel = false)
|
||||
{
|
||||
for (; cur; cur.forwardChar()) {
|
||||
if (onlysel && endcur.pit() == cur.pit()
|
||||
if (onlysel && cur.inTexted() && endcur.pit() == cur.pit()
|
||||
&& endcur.idx() == cur.idx() && endcur.pos() < cur.pos())
|
||||
break;
|
||||
if (cur.inTexted()) {
|
||||
@ -259,7 +259,7 @@ int findBackwards(DocIterator & cur, DocIterator const endcur,
|
||||
{
|
||||
while (cur) {
|
||||
cur.backwardChar();
|
||||
if (onlysel && endcur.pit() == cur.pit()
|
||||
if (onlysel && cur.inTexted() && endcur.pit() == cur.pit()
|
||||
&& endcur.idx() == cur.idx() && endcur.pos() > cur.pos())
|
||||
break;
|
||||
if (cur.inTexted()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user