mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
Text3.cpp: fix crash reported in #6133, patch from Tommaso
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31070 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2595c689bd
commit
f7aa1c1c5d
@ -204,13 +204,14 @@ void regexpDispatch(Cursor & cur, FuncRequest const & cmd)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cur.recordUndo();
|
cur.recordUndo();
|
||||||
docstring const save_selection = grabAndEraseSelection(cur);
|
docstring sel = cur.selectionAsString(false);
|
||||||
selClearOrDel(cur);
|
|
||||||
// replaceSelection(cur);
|
// It may happen that sel is empty but there is a selection
|
||||||
|
replaceSelection(cur);
|
||||||
|
|
||||||
cur.insert(new InsetMathHull(hullRegexp));
|
cur.insert(new InsetMathHull(hullRegexp));
|
||||||
cur.nextInset()->edit(cur, true);
|
cur.nextInset()->edit(cur, true);
|
||||||
cur.niceInsert(save_selection);
|
cur.niceInsert(sel);
|
||||||
|
|
||||||
cur.message(_("Regexp editor mode"));
|
cur.message(_("Regexp editor mode"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user