]> git.lyx.org Git - lyx.git/blobdiff - src/Text2.cpp
Transfer the setting of the current LyXView from workArea::focusInEvent() to GuiView...
[lyx.git] / src / Text2.cpp
index d3025d1845a757a635f28624f01f4655e002e50f..15a64b0b5ce03b08d8985495e24b5738bc1bac9a 100644 (file)
@@ -37,6 +37,7 @@
 #include "FuncRequest.h"
 #include "gettext.h"
 #include "Language.h"
+#include "Layout.h"
 #include "Lexer.h"
 #include "LyXFunc.h"
 #include "LyXRC.h"
@@ -58,6 +59,7 @@
 #include "support/textutils.h"
 
 #include <boost/current_function.hpp>
+#include <boost/next_prior.hpp>
 
 #include <sstream>
 
@@ -636,7 +638,7 @@ bool Text::cursorLeft(Cursor & cur)
 
        // move to the previous paragraph or do nothing
        if (cur.pit() > 0)
-               return setCursor(cur, cur.pit() - 1, getPar(cur.pit() - 1).size());
+               return setCursor(cur, cur.pit() - 1, getPar(cur.pit() - 1).size(), true, false);
        return false;
 }
 
@@ -693,7 +695,7 @@ bool Text::cursorRight(Cursor & cur)
 
        // move to next paragraph
        if (cur.pit() != cur.lastpit())
-               return setCursor(cur, cur.pit() + 1, 0);
+               return setCursor(cur, cur.pit() + 1, 0, true, false);
        return false;
 }
 
@@ -817,7 +819,7 @@ bool Text::deleteEmptyParagraphMechanism(Cursor & cur,
                plist.erase(boost::next(plist.begin(), old.pit()));
                // do not lose start of appendix marker (bug 4212)
                if (soa)
-                       boost::next(plist.begin(), old.pit())->params().startOfAppendix(true);
+                       plist[old.pit()].params().startOfAppendix(true);
 
                // see #warning (FIXME?) above 
                if (cur.depth() >= old.depth()) {