]> git.lyx.org Git - features.git/commitdiff
Do not allow completion when there is an active selection
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 3 Jul 2018 14:53:15 +0000 (16:53 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 4 Jul 2018 09:22:00 +0000 (11:22 +0200)
We do it in texted only, mathed is more difficult and not so relevant IMO.

(cherry picked from commit 789acb4a9517c7da0d70e3e473cc98d18eed7b00)

src/Text.cpp
status.23x

index 5b8fc9a8d8fd9debf1b34f7613e1f3462da5aea2..b38620545d4754dab88ec681be892e2137b8ea65 100644 (file)
@@ -2188,7 +2188,8 @@ docstring Text::previousWord(CursorSlice const & sl) const
 bool Text::completionSupported(Cursor const & cur) const
 {
        Paragraph const & par = cur.paragraph();
-       return cur.pos() > 0
+       return !cur.selection()
+               && cur.pos() > 0
                && (cur.pos() >= par.size() || par.isWordSeparator(cur.pos()))
                && !par.isWordSeparator(cur.pos() - 1);
 }
index 4310a1a0ed5a9d27ad60b6f505e0b8d6516a766f..ff3a95e88938ac37c3599e9b25029aae659e0aa0 100644 (file)
@@ -99,6 +99,8 @@ What's new
 
 - Added C-M-i as a shortcut for LFUN_INSET_SETTINGS (bug 7662).
 
+- Disable completion in text wwhen there is a selection.
+
 
 * DOCUMENTATION AND LOCALIZATION