]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfunc.C
Move #includes out of header files.
[lyx.git] / src / lyxfunc.C
index 78caa2909d22678d6d4036dc64534e442ef486a8..c7de612436e78f1250562b8b7e2998f0cfdaf9b1 100644 (file)
@@ -26,6 +26,8 @@
 #include "buffer.h"
 #include "buffer_funcs.h"
 #include "BufferView.h"
+#include "funcrequest.h"
+#include "iterators.h"
 #include "lyxserver.h"
 #include "intl.h"
 #include "lyx_main.h"
@@ -52,7 +54,6 @@
 #include "undo_funcs.h"
 #include "ParagraphParameters.h"
 
-#include "insets/insetbibtex.h"
 #include "insets/insetcommand.h"
 #include "insets/insetexternal.h"
 #include "insets/insettabular.h"
@@ -1441,6 +1442,7 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                string const & name = argument;
                string data;
                if (name == "bibitem" ||
+                   name == "bibtex" ||
                    name == "include" ||
                    name == "index" ||
                    name == "ref" ||
@@ -1448,10 +1450,6 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                    name == "url") {
                        InsetCommandParams p(name);
                        data = InsetCommandMailer::params2string(name, p);
-               } else if (name == "bibtex") {
-                       InsetBibtexParams p;
-                       Buffer const & buffer = *owner->buffer();
-                       data = InsetBibtexMailer::params2string(p, buffer);
                } else if (name == "citation") {
                        InsetCommandParams p("cite");
                        data = InsetCommandMailer::params2string(name, p);
@@ -1635,7 +1633,11 @@ exit_with_message:
        view()->owner()->updateLayoutChoice();
 
        if (view()->available()) {
-               view()->fitCursor();
+               if (view()->fitCursor()) {
+                       lyxerr << "LyXFunc->fitCursor->update" << endl;
+
+                       view()->update();
+               }
 
                // If we executed a mutating lfun, mark the buffer as dirty
                if (!getStatus(ev).disabled()