]> git.lyx.org Git - lyx.git/blobdiff - src/Text3.cpp
Fix bug #6284: missing space between # and text in math mode when using \mbox
[lyx.git] / src / Text3.cpp
index 28be96930e238f9fb29bdc9c0c8235bea9c7fe83..b7605efc1a164ec245bec592c28c052233c1e1de 100644 (file)
@@ -48,9 +48,7 @@
 
 #include "frontends/Application.h"
 #include "frontends/Clipboard.h"
-#include "frontends/LyXView.h"
 #include "frontends/Selection.h"
-#include "frontends/WorkArea.h"
 
 #include "insets/InsetCollapsable.h"
 #include "insets/InsetCommand.h"
@@ -641,6 +639,18 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                cur.updateFlags(Update::FitCursor);
                break;
 
+       case LFUN_INSET_SELECT_ALL:
+               if (cur.depth() == 1 || !cur.selection() || !cur.selBegin().at_begin()
+                         || !cur.selEnd().at_end()) {
+                       needsUpdate |= cur.selHandle(false);
+                       needsUpdate |= cursorTop(cur);
+                       needsUpdate |= cur.selHandle(true);
+                       needsUpdate |= cursorBottom(cur);
+               } else 
+                       cur.undispatched();
+               cur.updateFlags(Update::FitCursor);
+               break;
+
        case LFUN_CHAR_FORWARD:
        case LFUN_CHAR_FORWARD_SELECT:
                //LYXERR0(" LFUN_CHAR_FORWARD[SEL]:\n" << cur);
@@ -1986,7 +1996,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_ACCENT_HUNGARIAN_UMLAUT:
        case LFUN_ACCENT_CIRCLE:
        case LFUN_ACCENT_OGONEK:
-               theLyXFunc().handleKeyFunc(cmd.action);
+               theApp()->handleKeyFunc(cmd.action);
                if (!cmd.argument().empty())
                        // FIXME: Are all these characters encoded in one byte in utf8?
                        bv->translateAndInsert(cmd.argument()[0], this, cur);
@@ -2673,6 +2683,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_INSET_END:
        case LFUN_INSET_BEGIN_SELECT:
        case LFUN_INSET_END_SELECT:
+       case LFUN_INSET_SELECT_ALL:
        case LFUN_UNICODE_INSERT:
                // these are handled in our dispatch()
                enable = true;
@@ -2727,12 +2738,9 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_FONT_UWAVE:
        case LFUN_LABEL_GOTO:
        case LFUN_LAYOUT_TABULAR:
-       case LFUN_MENU_OPEN:
        case LFUN_NOACTION:
        case LFUN_NOTE_NEXT:
        case LFUN_REFERENCE_NEXT:
-       case LFUN_SERVER_GOTO_FILE_ROW:
-       case LFUN_SERVER_NOTIFY:
        case LFUN_SERVER_SET_XY:
        case LFUN_TEXTSTYLE_APPLY:
        case LFUN_TEXTSTYLE_UPDATE: