[LyX/master] Fix completion in math when inline completion was not yet shown

Jean-Marc Lasgouttes lasgouttes at lyx.org
Wed Feb 22 10:03:30 UTC 2023


commit b4211ef206827f85378b9392472fdc14e1e9f6c4
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Wed Feb 22 12:02:10 2023 +0100

    Fix completion in math when inline completion was not yet shown
    
    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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiCompleter.cpp b/src/frontends/qt/GuiCompleter.cpp
index 2aee436..6611785 100644
--- a/src/frontends/qt/GuiCompleter.cpp
+++ b/src/frontends/qt/GuiCompleter.cpp
@@ -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);
 


More information about the lyx-cvs mailing list