mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
+ auto completion wrap around
This commit is contained in:
parent
bf17732a74
commit
50e893bf7f
@ -218,10 +218,12 @@ void AutoComplete::Move(int delta) {
|
||||
const int count = lb->Length();
|
||||
int current = lb->GetSelection();
|
||||
current += delta;
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
if (current >= count)
|
||||
current = count - 1;
|
||||
current = (current == count ? 0 : count - 1);
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
current = (current == -1 ? count - 1 : 0);
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
lb->Select(current);
|
||||
}
|
||||
|
||||
|
||||
@ -7066,10 +7066,11 @@ bool EditAutoCompleteWord(HWND hwnd, bool autoInsert)
|
||||
// cppcheck-suppress constArgument
|
||||
SciCall_AutoCSetSeperator(sep[0]);
|
||||
SciCall_AutoCSetIgnoreCase(true);
|
||||
//SendMessage(hwnd, SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR, (WPARAM)SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE, 0);
|
||||
//~SciCall_AutoCSetCaseInsensitiveBehaviour(SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE);
|
||||
SciCall_AutoCSetChooseSingle(autoInsert);
|
||||
//~SciCall_AutoCSetOrder(SC_ORDER_PERFORMSORT); // already sorted
|
||||
SciCall_AutoCSetFillups(AutoCompleteFillUpChars);
|
||||
//~SciCall_AutoCSetMulti(SC_MULTIAUTOC_EACH);
|
||||
|
||||
++iWListSize; // zero termination
|
||||
char* const pList = AllocMem(iWListSize, HEAP_ZERO_MEMORY);
|
||||
|
||||
@ -317,10 +317,12 @@ DeclareSciCallR0(AutoCActive, AUTOCACTIVE, bool)
|
||||
DeclareSciCallV0(AutoCComplete, AUTOCCOMPLETE)
|
||||
DeclareSciCallV0(AutoCCancel, AUTOCCANCEL)
|
||||
DeclareSciCallV1(AutoCSetIgnoreCase, AUTOCSETIGNORECASE, bool, flag)
|
||||
DeclareSciCallV1(AutoCSetCaseInsensitiveBehaviour, AUTOCSETCASEINSENSITIVEBEHAVIOUR, int, options)
|
||||
DeclareSciCallV1(AutoCSetSeperator, AUTOCSETSEPARATOR, char, seperator)
|
||||
DeclareSciCallV01(AutoCSetFillups, AUTOCSETFILLUPS, const char*, text)
|
||||
DeclareSciCallV1(AutoCSetChooseSingle, AUTOCSETCHOOSESINGLE, bool, flag)
|
||||
DeclareSciCallV1(AutoCSetOrder, AUTOCSETORDER, int, options)
|
||||
DeclareSciCallV1(AutoCSetMulti, AUTOCSETMULTI, int, options)
|
||||
DeclareSciCallV2(AutoCShow, AUTOCSHOW, DocPos, len, const char*, list)
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user