Fix bug #6342: Pasting-bug in math-mode sub- and super-scripts

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32163 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2009-11-23 12:47:27 +00:00
parent fe6a944bdd
commit dcd06297ec
2 changed files with 7 additions and 3 deletions

View File

@ -1277,7 +1277,7 @@ void Cursor::niceInsert(docstring const & t, Parse::flags f)
{
MathData ar(&buffer());
asArray(t, ar, f);
if (ar.size() == 1)
if (ar.size() == 1 && selection())
niceInsert(ar[0]);
else
insert(ar);
@ -1288,9 +1288,10 @@ void Cursor::niceInsert(MathAtom const & t)
{
macroModeClose();
docstring const safe = cap::grabAndEraseSelection(*this);
// Enter the new inset and, if something is selected,
// move the contents of the selection if possible.
plainInsert(t);
// enter the new inset and move the contents of the selection if possible
if (t->isActive()) {
if (!safe.empty() && t->isActive()) {
posBackward();
// be careful here: don't use 'pushBackward(t)' as this we need to
// push the clone, not the original

View File

@ -317,6 +317,9 @@ What's new
- Dissolve the caption when unsetting a longtable caption row (bug 5754).
- Correctly position the cursor after pasting to a multi-cell math inset
(bug 6342).
* DOCUMENTATION AND LOCALIZATION