]> git.lyx.org Git - lyx.git/blobdiff - src/minibuffer.C
Fix crash when running lyx -dbg insets -e ...
[lyx.git] / src / minibuffer.C
index f6b67c4cdb1aed6ebb4115a7d267eec60998799c..a347acec8e23893e275cfded86bd2d4c6a34c7dc 100644 (file)
@@ -23,6 +23,7 @@
 #include "support/lyxalgo.h"
 #include "support/filetools.h"
 #include "LyXView.h"
+#include "XFormsView.h"
 #include "gettext.h"
 #include "LyXAction.h"
 #include "BufferView.h"
@@ -102,7 +103,7 @@ int MiniBuffer::peek_event(FL_OBJECT * ob, int event, int key)
                                stored_set(input);
                                fl_set_input(ob, _("[End of history]"));
                        } else {
-                               fl_set_input(ob, (*hist_iter).c_str());
+                               fl_set_input(ob, hist_iter->c_str());
                        }
                        return 1; 
                case XK_Up:
@@ -112,7 +113,7 @@ int MiniBuffer::peek_event(FL_OBJECT * ob, int event, int key)
                                fl_set_input(ob, _("[Beginning of history]"));
                        } else {
                                --hist_iter;
-                               fl_set_input(ob, (*hist_iter).c_str());
+                               fl_set_input(ob, hist_iter->c_str());
                        }
                        return 1; 
                case 9:
@@ -246,7 +247,8 @@ void MiniBuffer::prepare()
        text.erase();
        fl_set_input(the_buffer, "");
        activate();
-       fl_set_focus_object(owner_->getForm(), the_buffer);
+       fl_set_focus_object(static_cast<XFormsView *>(owner_)->getForm(),
+                           the_buffer);
 }