]> git.lyx.org Git - lyx.git/blobdiff - src/ParagraphMetrics.cpp
* gcc does not like missing characters in keywords
[lyx.git] / src / ParagraphMetrics.cpp
index 6b889083086f6414e4b80e1fdc9d805f4ed4248c..9d6404dbe6047f829d2b66562120f023d6bbb981 100644 (file)
@@ -215,12 +215,12 @@ int ParagraphMetrics::rightMargin(Buffer const & buffer) const
 
 int ParagraphMetrics::singleWidth(pos_type pos, Font const & font) const
 {
-       char_type c = par_->getChar(pos);
-
        // The most special cases are handled first.
-       if (c == Paragraph::META_INSET)
+       if (par_->isInset(pos))
                return insetDimension(par_->getInset(pos)).wid;
 
+       char_type c = par_->getChar(pos);
+
        if (!isPrintable(c))
                return theFontMetrics(font).width(c);