]> git.lyx.org Git - features.git/commitdiff
* open popup on complete-accept if there is a completion available
authorStefan Schimanski <sts@lyx.org>
Sun, 16 Nov 2008 16:34:16 +0000 (16:34 +0000)
committerStefan Schimanski <sts@lyx.org>
Sun, 16 Nov 2008 16:34:16 +0000 (16:34 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27561 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiCompleter.cpp
src/frontends/qt4/GuiView.cpp

index 2eb5f18e35223663f16080c263a66dcb62e8075a..a110bb21e046122426108e964daac3a34f2ab6f0 100644 (file)
@@ -625,9 +625,9 @@ void GuiCompleter::hideInline()
 void GuiCompleter::activate()
 {
        if (!popupVisible() && !inlineVisible())
-               return;
-
-       popupActivated(currentCompletion());
+               tab();
+       else
+               popupActivated(currentCompletion());
 }
 
 
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()))