]> git.lyx.org Git - lyx.git/blobdiff - src/text2.C
LFUN_UNICODE_INSERT - unicode-insert
[lyx.git] / src / text2.C
index 239cb1e4059bd38a52e75e55d9f29bc7f4a97cd8..cfb1a824b92c4e7d6c230e73002e16fc616dcd9f 100644 (file)
@@ -958,6 +958,10 @@ Row const & LyXText::getRowNearY(int y, pit_type pit) const
 // sets cursor recursively descending into nested editable insets
 InsetBase * LyXText::editXY(LCursor & cur, int x, int y)
 {
+       if (lyxerr.debugging(Debug::WORKAREA)) {
+               lyxerr << "LyXText::editXY(cur, " << x << ", " << y << ")" << std::endl;
+               bv()->coordCache().dump();
+       }
        pit_type pit = getPitNearY(y);
        BOOST_ASSERT(pit != -1);
        Row const & row = getRowNearY(y, pit);
@@ -980,33 +984,10 @@ InsetBase * LyXText::editXY(LCursor & cur, int x, int y)
                return 0;
        }
 
-       int i=0;
-       InsetBase * inset2 = pars_[pit].getInset(pos - 1);
-       InsetBase * inset3 = pars_[pit].getInset(pos);
-       if (inset != pars_[pit].getInset(pos - 1))
-       {
-               i++;            
-               std::cout << "pit " << pit 
-               << "  pos -1 " << pos - 1
-               << "\ninset " << inset
-               << "\ninset2 " << inset2
-               << endl;
-       }
-
-       if (inset != pars_[pit].getInset(pos))
-       {               
-               i++;
-               std::cout << "pit " << pit 
-               << "  pos " << pos
-               << "\ninset " << inset
-               << "\ninset3 " << inset3
-               << endl;
-       }
-       if (i == 2)
-               std::cout << endl;
-
        // This should be just before or just behind the
        // cursor position set above.
+        InsetBase * inset2 = pars_[pit].getInset(pos - 1);
+        InsetBase * inset3 = pars_[pit].getInset(pos);
         
        BOOST_ASSERT((pos != 0 && inset == inset2)
                     || inset == inset3);
@@ -1281,7 +1262,7 @@ bool LyXText::deleteEmptyParagraphMechanism(LCursor & cur, LCursor & old)
                    && oldpar.isLineSeparator(old.pos())
                    && oldpar.isLineSeparator(old.pos() - 1)
                    && oldpar.lookupChange(old.pos() - 1).type != Change::DELETED) {
-                       oldpar.erase(old.pos() - 1, false); // do not track changes in DEPM
+                       oldpar.eraseChar(old.pos() - 1, false); // do not track changes in DEPM
 #ifdef WITH_WARNINGS
 #warning This will not work anymore when we have multiple views of the same buffer
 // In this case, we will have to correct also the cursors held by