]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfunc.C
oh well
[lyx.git] / src / lyxfunc.C
index d4986d6b2f463ed2dff5b28a3988b228913555d4..e71a977d1db6b0d9d3221eea704a0aca003be7d8 100644 (file)
@@ -661,9 +661,13 @@ FuncStatus LyXFunc::getStatus(kb_action action,
        case LFUN_MENU_SEPARATOR:
        case LFUN_LDOTS:
        case LFUN_END_OF_SENTENCE:
-       case LFUN_PROTECTEDSPACE:
                code = Inset::SPECIALCHAR_CODE;
                break;
+       case LFUN_PROTECTEDSPACE:
+               // slight hack: we know this is allowed in math mode
+               if (!mathcursor)
+                       code = Inset::SPECIALCHAR_CODE;
+               break;
        default:
                break;
        }
@@ -949,7 +953,7 @@ string const LyXFunc::dispatch(kb_action action, string argument)
                                                TEXT()->cursor.irow()->baseline() +
                                                TEXT()->cursor.irow()->height() + 1);
                                        TEXT()->cursor.x_fix(TEXT()->cursor.x());
-#else                                  
+#else
                                        TEXT()->cursorDown(owner->view());
 #endif
                                } else {
@@ -958,7 +962,9 @@ string const LyXFunc::dispatch(kb_action action, string argument)
                                moveCursorUpdate(true, false);
                                owner->showState();
                                goto exit_with_message;
-                       } else {
+                       }
+#warning I am not sure this is still right, please have a look! (Jug 20020417)
+                       else { // result == UNDISPATCHED
                                //setMessage(N_("Text mode"));
                                switch (action) {
                                case LFUN_UNKNOWN_ACTION:
@@ -1019,6 +1025,8 @@ string const LyXFunc::dispatch(kb_action action, string argument)
                                                        true);
                        }
                        finishUndo();
+                       // Tell the paragraph dialog that we changed paragraph
+                       owner->getDialogs()->updateParagraph();
                }
        }
        break;