From: Jean-Marc Lasgouttes Date: Tue, 3 Jul 2018 14:53:15 +0000 (+0200) Subject: Do not allow completion when there is an active selection X-Git-Tag: 2.3.1~63 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5eb4a155793683cb5c4ff4f1c438e1a04da54011;p=features.git Do not allow completion when there is an active selection We do it in texted only, mathed is more difficult and not so relevant IMO. (cherry picked from commit 789acb4a9517c7da0d70e3e473cc98d18eed7b00) --- diff --git a/src/Text.cpp b/src/Text.cpp index 5b8fc9a8d8..b38620545d 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -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); } diff --git a/status.23x b/status.23x index 4310a1a0ed..ff3a95e889 100644 --- a/status.23x +++ b/status.23x @@ -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