mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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 789acb4a95
)
This commit is contained in:
parent
3d5b544e7a
commit
5eb4a15579
@ -2188,7 +2188,8 @@ docstring Text::previousWord(CursorSlice const & sl) const
|
|||||||
bool Text::completionSupported(Cursor const & cur) const
|
bool Text::completionSupported(Cursor const & cur) const
|
||||||
{
|
{
|
||||||
Paragraph const & par = cur.paragraph();
|
Paragraph const & par = cur.paragraph();
|
||||||
return cur.pos() > 0
|
return !cur.selection()
|
||||||
|
&& cur.pos() > 0
|
||||||
&& (cur.pos() >= par.size() || par.isWordSeparator(cur.pos()))
|
&& (cur.pos() >= par.size() || par.isWordSeparator(cur.pos()))
|
||||||
&& !par.isWordSeparator(cur.pos() - 1);
|
&& !par.isWordSeparator(cur.pos() - 1);
|
||||||
}
|
}
|
||||||
|
@ -99,6 +99,8 @@ What's new
|
|||||||
|
|
||||||
- Added C-M-i as a shortcut for LFUN_INSET_SETTINGS (bug 7662).
|
- 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
|
* DOCUMENTATION AND LOCALIZATION
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user