diff options
author | Neil <nyamatongwe@gmail.com> | 2021-07-17 14:54:31 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-07-17 14:54:31 +1000 |
commit | ad0162453e48fb729d1793eca40ac137e1e3451e (patch) | |
tree | 158e0126b95245ca178531dcba45e4ffc5dcdde5 /src/ScintillaBase.cxx | |
parent | 9aa05526ca323258c4879520093a0fe27826d53c (diff) | |
download | scintilla-mirror-ad0162453e48fb729d1793eca40ac137e1e3451e.tar.gz |
Add SCI_AUTOCSETOPTIONS to allow choosing a non-resizeable autocompletion list
on Win32. This also avoids a header rectangle above the list.
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r-- | src/ScintillaBase.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 0adca2f6f..238299734 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -257,16 +257,17 @@ void ScintillaBase::AutoCompleteStart(Sci::Position lenEntered, const char *list return; } } - ac.Start(wMain, idAutoComplete, sel.MainCaret(), PointMainCaret(), - lenEntered, vs.lineHeight, IsUnicodeMode(), technology); ListOptions options{ vs.ElementColour(Element::List), vs.ElementColour(Element::ListBack), vs.ElementColour(Element::ListSelected), - vs.ElementColour(Element::ListSelectedBack) + vs.ElementColour(Element::ListSelectedBack), + ac.options, }; - ac.lb->SetOptions(options); + + ac.Start(wMain, idAutoComplete, sel.MainCaret(), PointMainCaret(), + lenEntered, vs.lineHeight, IsUnicodeMode(), technology, options); const PRectangle rcClient = GetClientRectangle(); Point pt = LocationFromPosition(sel.MainCaret() - lenEntered); @@ -942,6 +943,13 @@ sptr_t ScintillaBase::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) { case Message::AutoCGetAutoHide: return ac.autoHide; + case Message::AutoCSetOptions: + ac.options = static_cast<AutoCompleteOption>(wParam); + break; + + case Message::AutoCGetOptions: + return static_cast<sptr_t>(ac.options); + case Message::AutoCSetDropRestOfWord: ac.dropRestOfWord = wParam != 0; break; |