]> git.lyx.org Git - lyx.git/blobdiff - src/text.C
Fix #1736
[lyx.git] / src / text.C
index aaa1fbf088a3d9ba674e1a86fe1f920a8ad6979b..fc41964fa042ec897b7990e1125bc025d088175c 100644 (file)
@@ -324,14 +324,14 @@ void readParToken(Buffer const & buf, Paragraph & par, LyXLex & lex,
                        par.cleanChanges();
                change = Change(Change::UNCHANGED);
        } else if (token == "\\change_inserted") {
-               lex.nextToken();
+               lex.eatLine();
                std::istringstream is(lex.getString());
                int aid;
                lyx::time_type ct;
                is >> aid >> ct;
                change = Change(Change::INSERTED, bp.author_map[aid], ct);
        } else if (token == "\\change_deleted") {
-               lex.nextToken();
+               lex.eatLine();
                std::istringstream is(lex.getString());
                int aid;
                lyx::time_type ct;
@@ -609,9 +609,10 @@ int LyXText::leftMargin(par_type const pit, pos_type const pos) const
                   && !isFirstInSequence(pit, pars_)))
            && align == LYX_ALIGN_BLOCK
            && !par.params().noindent()
-           // in tabulars and ert paragraphs are never indented!
+           // in charstyles, tabulars and ert paragraphs are never indented!
            && (par.ownerCode() != InsetBase::TEXT_CODE
-                   && par.ownerCode() != InsetBase::ERT_CODE)
+                   && par.ownerCode() != InsetBase::ERT_CODE
+                   && par.ownerCode() != InsetBase::CHARSTYLE_CODE)
            && (par.layout() != tclass.defaultLayout()
                || bv()->buffer()->params().paragraph_separation ==
                   BufferParams::PARSEP_INDENT))
@@ -625,12 +626,11 @@ int LyXText::leftMargin(par_type const pit, pos_type const pos) const
 
 int LyXText::rightMargin(Paragraph const & par) const
 {
-       LyXTextClass const & tclass = bv()->buffer()->params().getLyXTextClass();
-
        // We do not want rightmargins on inner texts.
        if (bv()->text() != this)
                return 0;
 
+       LyXTextClass const & tclass = bv()->buffer()->params().getLyXTextClass();
        int const r_margin =
                ::rightMargin()
                + font_metrics::signedWidth(tclass.rightmargin(),
@@ -640,7 +640,6 @@ int LyXText::rightMargin(Paragraph const & par) const
                * 4 / (par.getDepth() + 4);
 
        return r_margin;
-
 }