]> git.lyx.org Git - lyx.git/blobdiff - src/TextMetrics.cpp
Harmonize naming
[lyx.git] / src / TextMetrics.cpp
index d0f9b3d83ef404b7b78703441f6d7887eef13fb8..618c893d876b9b68151b3c5738a2d61963fb011b 100644 (file)
@@ -771,7 +771,7 @@ public:
        FontIterator & operator++()
        {
                ++pos_;
-               if (pos_ > endspan_ || pos_ == bodypos_) {
+               if (pos_ < par_.size() && (pos_ > endspan_ || pos_ == bodypos_)) {
                        font_ = tm_.displayFont(pit_, pos_);
                        endspan_ = par_.fontSpan(pos_).last;
                }
@@ -1512,10 +1512,6 @@ Inset * TextMetrics::editXY(Cursor & cur, int x, int y,
        Inset * inset = checkInsetHit(x, yy);
        //lyxerr << "inset " << inset << " hit at x: " << x << " y: " << y << endl;
        if (!inset) {
-               // Either we deconst editXY or better we move current_font
-               // and real_current_font to Cursor
-               // FIXME: what is needed now that current_font and real_current_font
-               // are transferred?
                cur.setCurrentFont();
                return 0;
        }