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.
This commit is contained in:
Jean-Marc Lasgouttes 2023-02-22 12:02:10 +01:00
parent ab8ea2543d
commit b4211ef206

View File

@ -710,7 +710,7 @@ void GuiCompleter::tab()
docstring longestCompletion = longestUniqueCompletion(); docstring longestCompletion = longestUniqueCompletion();
prefix = cur.inset().completionPrefix(cur); prefix = cur.inset().completionPrefix(cur);
docstring postfix = longestCompletion.substr(min(longestCompletion.size(), prefix.size())); 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(); old_cursor_ = bv.cursor();
updatePrefix(cur); updatePrefix(cur);