mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
When pasting into mathed, take into account the current mode.
For example, this allows to paste something like $x$ to a textmode inset and get the expected result. If $x$ is pasted in mathmode, it is pasted verbatim, such that no compile errors can arise. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26935 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
02ebfa000b
commit
6bd593d8b3
@ -1251,6 +1251,8 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
parseflg |= Parse::VERBATIM;
|
||||
// fall through
|
||||
case LFUN_PASTE: {
|
||||
if (cur.currentMode() == TEXT_MODE)
|
||||
parseflg |= Parse::TEXTMODE;
|
||||
cur.message(_("Paste"));
|
||||
cap::replaceSelection(cur);
|
||||
docstring topaste;
|
||||
|
@ -521,6 +521,8 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
parseflg |= Parse::VERBATIM;
|
||||
// fall through
|
||||
case LFUN_PASTE: {
|
||||
if (cur.currentMode() == TEXT_MODE)
|
||||
parseflg |= Parse::TEXTMODE;
|
||||
cur.recordUndoSelection();
|
||||
cur.message(_("Paste"));
|
||||
replaceSelection(cur);
|
||||
|
Loading…
Reference in New Issue
Block a user