]> git.lyx.org Git - lyx.git/blobdiff - src/Text3.cpp
GuiWrap: make the optional options really optional by checkboxes in the dialog
[lyx.git] / src / Text3.cpp
index 75ff5a018d52e6656cc3941d0f47be2fb97e7fe9..408405d7605b364cdbeb22929b450c90aaa225dd 100644 (file)
@@ -385,8 +385,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                                && cur.boundary() == oldBoundary) {
                        cur.undispatched();
                        cmd = FuncRequest(LFUN_FINISHED_RIGHT);
-               } else
-                       cur.setCurrentFont();
+               }
                break;
 
        case LFUN_CHAR_BACKWARD:
@@ -402,8 +401,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                        && cur.boundary() == oldBoundary) {
                        cur.undispatched();
                        cmd = FuncRequest(LFUN_FINISHED_LEFT);
-               } else
-                       cur.setCurrentFont();
+               }
                break;
 
        case LFUN_UP_SELECT:
@@ -1377,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: {