]> git.lyx.org Git - lyx.git/blobdiff - src/Text3.cpp
BufferParams.cpp: change the package loading to:
[lyx.git] / src / Text3.cpp
index a7186bc64f42691d61da2069a37b7bea82caf7d9..408405d7605b364cdbeb22929b450c90aaa225dd 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "Text.h"
 
+#include "Bidi.h"
 #include "BranchList.h"
 #include "FloatList.h"
 #include "FuncStatus.h"
@@ -1302,7 +1303,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                break;
        }
 
-       case LFUN_FONT_CODE: {
+       case LFUN_FONT_TYPEWRITER: {
                Font font(Font::ALL_IGNORE);
                font.setFamily(Font::TYPEWRITER_FAMILY); // no good
                toggleAndShow(cur, this, font);
@@ -1374,14 +1375,18 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
 
        case LFUN_FINISHED_LEFT:
                LYXERR(Debug::DEBUG) << "handle LFUN_FINISHED_LEFT:\n" << cur << endl;
-               if (reverseDirectionNeeded(cur))
+               if (reverseDirectionNeeded(cur)) {
                        ++cur.pos();
+                       cur.setCurrentFont();
+               }
                break;
 
        case LFUN_FINISHED_RIGHT:
                LYXERR(Debug::DEBUG) << "handle LFUN_FINISHED_RIGHT:\n" << cur << endl;
-               if (!reverseDirectionNeeded(cur))
+               if (!reverseDirectionNeeded(cur)) {
                        ++cur.pos();
+                       cur.setCurrentFont();
+               }
                break;
 
        case LFUN_LAYOUT_PARAGRAPH: {
@@ -1770,7 +1775,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
                flag.setOnOff(font.family() == Font::ROMAN_FAMILY);
                return true;
 
-       case LFUN_FONT_CODE:
+       case LFUN_FONT_TYPEWRITER:
                flag.setOnOff(font.family() == Font::TYPEWRITER_FAMILY);
                return true;