mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-28 20:45:47 +00:00
Fix crash when attempting to search in selection that contains only math
(cherry picked from commit cca68d0614
)
This commit is contained in:
parent
2882bed1ab
commit
f8949079ef
@ -240,7 +240,7 @@ int findForward(DocIterator & cur, DocIterator const endcur,
|
|||||||
bool find_del = true, bool onlysel = false)
|
bool find_del = true, bool onlysel = false)
|
||||||
{
|
{
|
||||||
for (; cur; cur.forwardChar()) {
|
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())
|
&& endcur.idx() == cur.idx() && endcur.pos() < cur.pos())
|
||||||
break;
|
break;
|
||||||
if (cur.inTexted()) {
|
if (cur.inTexted()) {
|
||||||
@ -259,7 +259,7 @@ int findBackwards(DocIterator & cur, DocIterator const endcur,
|
|||||||
{
|
{
|
||||||
while (cur) {
|
while (cur) {
|
||||||
cur.backwardChar();
|
cur.backwardChar();
|
||||||
if (onlysel && endcur.pit() == cur.pit()
|
if (onlysel && cur.inTexted() && endcur.pit() == cur.pit()
|
||||||
&& endcur.idx() == cur.idx() && endcur.pos() > cur.pos())
|
&& endcur.idx() == cur.idx() && endcur.pos() > cur.pos())
|
||||||
break;
|
break;
|
||||||
if (cur.inTexted()) {
|
if (cur.inTexted()) {
|
||||||
|
@ -49,6 +49,8 @@ What's new
|
|||||||
|
|
||||||
* USER INTERFACE
|
* USER INTERFACE
|
||||||
|
|
||||||
|
- Fix crash when attempting to search in selection that contains only math.
|
||||||
|
|
||||||
- Fix bug where the dialog asking for saving unapplied changes on buffer change
|
- Fix bug where the dialog asking for saving unapplied changes on buffer change
|
||||||
popped up twice, or sometimes not at all (bug 12954).
|
popped up twice, or sometimes not at all (bug 12954).
|
||||||
|
|
||||||
@ -87,3 +89,4 @@ What's new
|
|||||||
* BUILD/INSTALLATION
|
* BUILD/INSTALLATION
|
||||||
|
|
||||||
- Fix 'make install' target for autotools builds with autoconf >= 2.72.
|
- Fix 'make install' target for autotools builds with autoconf >= 2.72.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user