]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
Micro-optimization.
[lyx.git] / src / BufferView.cpp
index 8d6ba040f4d60689da65ead22a7d074aa954f428..1e0f4b249dac13f86c04cf4d2f22f7a49dae9df8 100644 (file)
@@ -39,7 +39,6 @@
 #include "LyX.h"
 #include "LyXAction.h"
 #include "lyxfind.h"
-#include "LyXFunc.h"
 #include "Layout.h"
 #include "LyXRC.h"
 #include "MetricsInfo.h"
@@ -913,7 +912,7 @@ void BufferView::updateLayout(DocumentClass const * const oldlayout)
        setCursor(backcur.asDocIterator(&buffer_));
 
        buffer_.errors("Class Switch");
-       buffer_.updateLabels();
+       buffer_.updateBuffer();
 }
 
 /** Return the change status at cursor position, taking in account the
@@ -1024,12 +1023,6 @@ bool BufferView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
                flag.setEnabled(true);
                break;
 
-       case LFUN_REGEXP_MODE:
-               // FIXME: Test if current WorkArea is the search WorkArea
-               flag.setEnabled(buffer().isInternal() && !cur.inRegexped()
-                               && cur.inset().lyxCode() != ERT_CODE);
-               break;
-
        case LFUN_LABEL_COPY_AS_REF: {
                // if there is an inset at cursor, see whether it
                // handles the lfun
@@ -1347,9 +1340,9 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                                dr.update(Update::Force | Update::FitCursor);
                        } else {
                                // Switch to other buffer view and resend cmd
-                               theLyXFunc().dispatch(FuncRequest(
+                               lyx::dispatch(FuncRequest(
                                        LFUN_BUFFER_SWITCH, b->absFileName()));
-                               theLyXFunc().dispatch(cmd);
+                               lyx::dispatch(cmd);
                        }
                        break;
                }
@@ -1464,7 +1457,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                if (cmd.argument().empty() && !d->search_request_cache_.argument().empty())
                        req = d->search_request_cache_;
                if (req.argument().empty()) {
-                       theLyXFunc().dispatch(FuncRequest(LFUN_DIALOG_SHOW, "findreplace"));
+                       lyx::dispatch(FuncRequest(LFUN_DIALOG_SHOW, "findreplace"));
                        break;
                }
                if (find(this, req))
@@ -2234,7 +2227,7 @@ bool BufferView::checkDepm(Cursor & cur, Cursor & old)
 
        d->cursor_ = cur;
 
-       buffer_.updateLabels();
+       buffer_.updateBuffer();
        buffer_.changed(true);
        return true;
 }