]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiView.cpp
* open popup on complete-accept if there is a completion available
[lyx.git] / src / frontends / qt4 / GuiView.cpp
index 108bd0451ea192a00e7d03473828a4ec21d0b3e7..d45b939466d13423f016a57126e83ea31b171bf9 100644 (file)
@@ -1300,7 +1300,14 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
                break;
 
        case LFUN_COMPLETION_ACCEPT:
-       case LFUN_COMPLETION_CANCEL:
+               if (!d.current_work_area_
+                   || (!d.current_work_area_->completer().popupVisible()
+                       && !d.current_work_area_->completer().inlineVisible()
+                       && !d.current_work_area_->completer().completionAvailable()))
+                       enable = false;
+               break;
+
+               case LFUN_COMPLETION_CANCEL:
                if (!d.current_work_area_
                    || (!d.current_work_area_->completer().popupVisible()
                        && !d.current_work_area_->completer().inlineVisible()))