]> git.lyx.org Git - lyx.git/blobdiff - src/TextMetrics.cpp
Fix assertion when checking if change in selection
[lyx.git] / src / TextMetrics.cpp
index e5345dd0405c7cd775dfc0dbd5de582aa846c713..cacf2e7ea65326ff73312eebe12b97e01d4df631 100644 (file)
@@ -1573,7 +1573,7 @@ void TextMetrics::deleteLineForward(Cursor & cur)
                if (!cur.selection())
                        text_->deleteWordForward(cur);
                else
-                       cap::cutSelection(cur, true, false);
+                       cap::cutSelection(cur, false);
                cur.checkBufferStructure();
        }
 }
@@ -1618,10 +1618,10 @@ int TextMetrics::leftMargin(pit_type const pit, pos_type const pos) const
 
        int l_margin = 0;
 
-       if (text_->isMainText())
+       if (text_->isMainText()) {
                l_margin += bv_->leftMargin();
-
-       l_margin += bfm.signedWidth(tclass.leftmargin());
+               l_margin += bfm.signedWidth(tclass.leftmargin());
+       }
 
        int depth = par.getDepth();
        if (depth != 0) {