From 789acb4a9517c7da0d70e3e473cc98d18eed7b00 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 3 Jul 2018 16:53:15 +0200 Subject: [PATCH] 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. --- src/Text.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Text.cpp b/src/Text.cpp index b38baa7953..cf5b2ef02e 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -2194,7 +2194,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); } -- 2.39.2