aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ScintillaBase.cxx
diff options
context:
space:
mode:
authorJiří Techet <techet@gmail.com>2024-03-08 07:56:22 +1100
committerJiří Techet <techet@gmail.com>2024-03-08 07:56:22 +1100
commit548093449967bb84aaf112df736428681657c528 (patch)
tree2b0fa62496674d8d1f777679628a56e8fcbca0c0 /src/ScintillaBase.cxx
parent792b3fde18766b74c56472a26fa82107b650d3e4 (diff)
downloadscintilla-mirror-548093449967bb84aaf112df736428681657c528.tar.gz
Bug [#2403]. Add SC_AUTOCOMPLETE_SELECT_FIRST_ITEM.
This option always selects the first item in the autocompletion list.
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r--src/ScintillaBase.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx
index a629cdd33..c66a689b7 100644
--- a/src/ScintillaBase.cxx
+++ b/src/ScintillaBase.cxx
@@ -353,6 +353,8 @@ void ScintillaBase::AutoCompleteMove(int delta) {
}
void ScintillaBase::AutoCompleteMoveToCurrentWord() {
+ if (FlagSet(ac.options, AutoCompleteOption::SelectFirstItem))
+ return;
std::string wordCurrent = RangeText(ac.posStart - ac.startLen, sel.MainCaret());
ac.Select(wordCurrent.c_str());
}