]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfunc.C
don't rm emergency saves ever
[lyx.git] / src / lyxfunc.C
index 849ff725714279177a13bf394aab278811eb3c34..57c86892d143af3b285db06b02337c906fd1a467 100644 (file)
@@ -125,7 +125,6 @@ void LyXFunc::moveCursorUpdate(bool flag, bool selecting)
                    view()->toggleToggle();
        }
        view()->update(TEXT(flag), BufferView::SELECT);
-       view()->showCursor();
 
        view()->switchKeyMap();
 }
@@ -815,9 +814,6 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
 
        selection_possible = false;
 
-       if (view()->available())
-               view()->hideCursor();
-
        string argument = ev.argument;
        kb_action action = ev.action;
 
@@ -831,6 +827,9 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                goto exit_with_message;
        }
 
+       if (view()->available())
+               view()->hideCursor();
+
        if (view()->available() && view()->theLockingInset()) {
                Inset::RESULT result;
                if ((action > 1) || ((action == LFUN_UNKNOWN_ACTION) &&
@@ -991,7 +990,6 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                if (!searched_string.empty()) {
                        lyxfind::LyXFind(view(), searched_string, fw);
                }
-//             view()->showCursor();
        }
        break;
 
@@ -1085,7 +1083,7 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                text += file + _("?");
 #endif
                int const ret = Alert::prompt(_("Revert to saved document?"),
-                       text, 1, _("&Revert"), _("&Cancel"));
+                       text, 0, 1, _("&Revert"), _("&Cancel"));
 
                if (ret == 0)
                        view()->reload();
@@ -1385,7 +1383,7 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
 
                int id;
                istr >> id;
-               Paragraph * par = owner->buffer()->getParFromID(id);
+               Paragraph * par = &*owner->buffer()->getParFromID(id);
                if (par == 0) {
                        lyxerr[Debug::INFO] << "No matching paragraph found! ["
                                            << id << ']' << endl;
@@ -1935,7 +1933,7 @@ void LyXFunc::doImport(string const & argument)
                text += file + _(" already exists.\n\nDo you want to over-write that document?");
 #endif
                int const ret = Alert::prompt(_("Over-write document?"),
-                       text, 1, _("&Over-write"), _("&Cancel"));
+                       text, 0, 1, _("&Over-write"), _("&Cancel"));
 
                if (ret == 1) {
                        owner->message(_("Canceled."));