mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +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;
|
||||
}
|
||||
cur.recordUndo();
|
||||
docstring const save_selection = grabAndEraseSelection(cur);
|
||||
selClearOrDel(cur);
|
||||
// replaceSelection(cur);
|
||||
docstring sel = cur.selectionAsString(false);
|
||||
|
||||
// It may happen that sel is empty but there is a selection
|
||||
replaceSelection(cur);
|
||||
|
||||
cur.insert(new InsetMathHull(hullRegexp));
|
||||
cur.nextInset()->edit(cur, true);
|
||||
cur.niceInsert(save_selection);
|
||||
cur.niceInsert(sel);
|
||||
|
||||
cur.message(_("Regexp editor mode"));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user