X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_scriptinset.C;h=11f858c31a6b16a329471a8eeeaff9087edbc80c;hb=57501b93064a6deed43e415beed45606054d86ad;hp=98a950e80916de933920bee820bcf1f0d1f98d99;hpb=ec744e7583d8bf642ed5f66321fd5845ba213a18;p=lyx.git diff --git a/src/mathed/math_scriptinset.C b/src/mathed/math_scriptinset.C index 98a950e809..11f858c31a 100644 --- a/src/mathed/math_scriptinset.C +++ b/src/mathed/math_scriptinset.C @@ -557,35 +557,20 @@ void MathScriptInset::notifyCursorLeaves(LCursor & cur) { MathNestInset::notifyCursorLeaves(cur); -#if 1 // remove empty scripts if possible -<<<<<<< math_scriptinset.C - if (cur.idx() == 2 && cell(2).empty()) { + if (nargs() > 2 && cur.idx() == 2 && cell(2).empty()) { // must be a subscript... removeScript(false); // sanitize cursor, even if this slice will be removed immediately cur.idx() = 0; cur.pos() = 0; - } else if (cur.idx() == 1 && cell(1).empty()) { + } else if (nargs() > 1 && cur.idx() == 1 && cell(1).empty()) { // could be either subscript or super script removeScript(cell_1_is_up_); // sanitize cursor, even if this slice will be removed immediately cur.idx() = 0; cur.pos() = 0; -======= - if (idx == 2 && nargs() > 2 && cell(2).empty()) { - removeScript(false); // must be a subscript... - } else if (idx == 1 && nargs() > 1 && cell(1).empty()) { - if (nargs() == 2) { - cell_1_is_up_ = false; - cell(1) = cell(2); - cells_.pop_back(); - } else if (nargs() == 1) { - cells_.pop_back(); - } ->>>>>>> 1.114 } -#endif }