]> git.lyx.org Git - lyx.git/commitdiff
Fix completion in math when inline completion was not yet shown
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 22 Feb 2023 11:02:10 +0000 (12:02 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 22 Feb 2023 11:02:10 +0000 (12:02 +0100)
It is necessary to set finish=true when the completion is unique.
Otherwise, one gets \upsilon instead of the proper glyph.

Fixes bug #12674.

src/frontends/qt/GuiCompleter.cpp

index 2aee43691231e0b243f28e95f38714a462cbfcfc..661178575b1f860e2a71ce82bedd42dd5470456f 100644 (file)
@@ -710,7 +710,7 @@ void GuiCompleter::tab()
        docstring longestCompletion = longestUniqueCompletion();
        prefix = cur.inset().completionPrefix(cur);
        docstring postfix = longestCompletion.substr(min(longestCompletion.size(), prefix.size()));
-       cur.inset().insertCompletion(cur, postfix, false);
+       cur.inset().insertCompletion(cur, postfix, uniqueCompletionAvailable());
        old_cursor_ = bv.cursor();
        updatePrefix(cur);