]> git.lyx.org Git - lyx.git/blobdiff - src/Text.cpp
Delay Spellchecker intanciation until first use.
[lyx.git] / src / Text.cpp
index 91714b4874952574a1e694aa2ae4b828cd13ee5f..73c16f1d775388a8d0b55b05eb13b5e808201d74 100644 (file)
@@ -545,7 +545,8 @@ void Text::insertChar(Cursor & cur, char_type c)
        cur.checkBufferStructure();
 
 //             cur.updateFlags(Update::Force);
-       setCursor(cur.top(), cur.pit(), cur.pos() + 1);
+       bool boundary = tm.isRTLBoundary(cur.pit(), cur.pos() + 1);
+       setCursor(cur, cur.pit(), cur.pos() + 1, false, boundary);
        charInserted(cur);
 }
 
@@ -794,8 +795,8 @@ void Text::acceptOrRejectChanges(Cursor & cur, ChangeOp op)
        LASSERT(this == cur.text(), /**/);
 
        if (!cur.selection()) {
-               Change const & change = cur.paragraph().lookupChange(cur.pos());
-               if (!(change.changed() && findNextChange(&cur.bv())))
+               bool const changed = cur.paragraph().isChanged(cur.pos());
+               if (!(changed && findNextChange(&cur.bv())))
                        return;
        }
 
@@ -1240,7 +1241,10 @@ bool Text::dissolveInset(Cursor & cur)
                // restore position
                cur.pit() = min(cur.lastpit(), spit);
                cur.pos() = min(cur.lastpos(), spos);
-       }
+       } else
+               // this is the least that needs to be done (bug 6003)
+               // in the above case, pasteParagraphList handles this
+               cur.buffer()->updateLabels();
        cur.clearSelection();
        cur.resetAnchor();
        return true;
@@ -1352,7 +1356,7 @@ docstring Text::currentState(Cursor const & cur) const
 
        Change change = par.lookupChange(cur.pos());
 
-       if (change.type != Change::UNCHANGED) {
+       if (change.changed()) {
                Author const & a = buf.params().authors().get(change.author);
                os << _("Change: ") << a.name();
                if (!a.email().empty())