Add option to make auto-completion list brief
Add filter and recall autocomplete option, so list will be shorter and shorter by adding characters. Fix #12783, close #13075
This commit is contained in:
parent
03a5c4795b
commit
9eab1f566d
|
@ -1132,6 +1132,7 @@ You can define several column markers by using white space to separate the diffe
|
|||
<Item id="6811" name="From"/>
|
||||
<Item id="6813" name="th character"/>
|
||||
<Item id="6814" name="Valid value : 1 - 9"/>
|
||||
<Item id="6872" name="Make auto-completion list brief"/>
|
||||
<Item id="6815" name="Function parameters hint on input"/>
|
||||
<Item id="6851" name="Auto-Insert"/>
|
||||
<Item id="6857" name=" html/xml close tag"/>
|
||||
|
|
|
@ -5531,6 +5531,9 @@ void NppParameters::feedGUIParameters(TiXmlNode *node)
|
|||
if (optName)
|
||||
_nppGUI._autocInsertSelectedUseTAB = (lstrcmp(optName, TEXT("yes")) == 0);
|
||||
|
||||
optName = element->Attribute(TEXT("autoCBrief"));
|
||||
if (optName)
|
||||
_nppGUI._autocBrief = (lstrcmp(optName, TEXT("yes")) == 0);
|
||||
|
||||
optName = element->Attribute(TEXT("funcParams"));
|
||||
if (optName)
|
||||
|
@ -7013,6 +7016,9 @@ void NppParameters::createXmlTreeFromGUIParams()
|
|||
pStr = _nppGUI._autocInsertSelectedUseTAB ? TEXT("yes") : TEXT("no");
|
||||
GUIConfigElement->SetAttribute(TEXT("insertSelectedItemUseTAB"), pStr);
|
||||
|
||||
pStr = _nppGUI._autocBrief ? TEXT("yes") : TEXT("no");
|
||||
GUIConfigElement->SetAttribute(TEXT("autoCBrief"), pStr);
|
||||
|
||||
pStr = _nppGUI._funcParams ? TEXT("yes") : TEXT("no");
|
||||
GUIConfigElement->SetAttribute(TEXT("funcParams"), pStr);
|
||||
}
|
||||
|
|
|
@ -855,6 +855,7 @@ struct NppGUI final
|
|||
bool _autocIgnoreNumbers = true;
|
||||
bool _autocInsertSelectedUseENTER = true;
|
||||
bool _autocInsertSelectedUseTAB = true;
|
||||
bool _autocBrief = false;
|
||||
bool _funcParams = true;
|
||||
MatchedPairConf _matchedPairConf;
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ static bool isAllDigits(const generic_string &str)
|
|||
return true;
|
||||
}
|
||||
|
||||
void sortInsensitive(vector<generic_string> &wordArray)
|
||||
static void sortInsensitive(vector<generic_string> &wordArray)
|
||||
{
|
||||
sort(
|
||||
wordArray.begin(),
|
||||
|
@ -280,7 +280,7 @@ void sortInsensitive(vector<generic_string> &wordArray)
|
|||
b.begin(), b.end(),
|
||||
[](const wchar_t &ch1, const wchar_t &ch2)
|
||||
{
|
||||
return toupper(ch1) < toupper(ch2);
|
||||
return towupper(ch1) < towupper(ch2);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -288,12 +288,13 @@ void sortInsensitive(vector<generic_string> &wordArray)
|
|||
}
|
||||
|
||||
|
||||
bool AutoCompletion::showApiComplete()
|
||||
bool AutoCompletion::showAutoComplete(AutocompleteType autocType, bool autoInsert)
|
||||
{
|
||||
if (!_funcCompletionActive)
|
||||
if (autocType == autocFunc && !_funcCompletionActive)
|
||||
return false;
|
||||
|
||||
// calculate entered word's length
|
||||
// Get beginning of word and complete word
|
||||
|
||||
intptr_t curPos = _pEditView->execute(SCI_GETCURRENTPOS);
|
||||
intptr_t startPos = _pEditView->execute(SCI_WORDSTARTPOSITION, curPos, true);
|
||||
|
||||
|
@ -301,113 +302,95 @@ bool AutoCompletion::showApiComplete()
|
|||
return false;
|
||||
|
||||
size_t len = (curPos > startPos)?(curPos - startPos):(startPos - curPos);
|
||||
if (len >= _keyWordMaxLen)
|
||||
return false;
|
||||
|
||||
if (NppDarkMode::isThemeDark())
|
||||
{
|
||||
if (!_isFxImageRegisteredDark)
|
||||
{
|
||||
_pEditView->execute(SCI_CLEARREGISTEREDIMAGES);
|
||||
_pEditView->execute(SCI_REGISTERIMAGE, FUNC_IMG_ID, LPARAM(xpmfnDark));
|
||||
_pEditView->execute(SCI_REGISTERIMAGE, BOX_IMG_ID, LPARAM(xpmboxDark));
|
||||
_isFxImageRegistered = false;
|
||||
_isFxImageRegisteredDark = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_isFxImageRegistered)
|
||||
{
|
||||
_pEditView->execute(SCI_CLEARREGISTEREDIMAGES);
|
||||
_pEditView->execute(SCI_REGISTERIMAGE, FUNC_IMG_ID, LPARAM(xpmfn));
|
||||
_pEditView->execute(SCI_REGISTERIMAGE, BOX_IMG_ID, LPARAM(xpmbox));
|
||||
_isFxImageRegistered = true;
|
||||
_isFxImageRegisteredDark = false;
|
||||
}
|
||||
}
|
||||
|
||||
_pEditView->execute(SCI_AUTOCSETTYPESEPARATOR, WPARAM('\x1E'));
|
||||
_pEditView->execute(SCI_AUTOCSETSEPARATOR, WPARAM(' '));
|
||||
_pEditView->execute(SCI_AUTOCSETIGNORECASE, _ignoreCase);
|
||||
_pEditView->execute(SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR, _ignoreCase);
|
||||
_pEditView->showAutoComletion(curPos - startPos, _keyWords.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AutoCompletion::showApiAndWordComplete()
|
||||
{
|
||||
|
||||
// Get beginning of word and complete word
|
||||
|
||||
auto curPos = _pEditView->execute(SCI_GETCURRENTPOS);
|
||||
auto startPos = _pEditView->execute(SCI_WORDSTARTPOSITION, curPos, true);
|
||||
auto endPos = _pEditView->execute(SCI_WORDENDPOSITION, curPos, true);
|
||||
|
||||
if (curPos == startPos)
|
||||
return false;
|
||||
|
||||
const size_t bufSize = 256;
|
||||
TCHAR beginChars[bufSize];
|
||||
TCHAR allChars[bufSize];
|
||||
|
||||
size_t len = (curPos > startPos)?(curPos - startPos):(startPos - curPos);
|
||||
if (len >= bufSize)
|
||||
return false;
|
||||
|
||||
size_t lena = (endPos > startPos)?(endPos - startPos):(startPos - endPos);
|
||||
if (lena >= bufSize)
|
||||
return false;
|
||||
|
||||
_pEditView->getGenericText(beginChars, bufSize, startPos, curPos);
|
||||
_pEditView->getGenericText(allChars, bufSize, startPos, endPos);
|
||||
|
||||
// Get word array containing all words beginning with beginChars, excluding word equal to allChars
|
||||
|
||||
vector<generic_string> wordArray;
|
||||
getWordArray(wordArray, beginChars, allChars);
|
||||
|
||||
// Add keywords to word array
|
||||
|
||||
for (size_t i = 0, kwlen = _keyWordArray.size(); i < kwlen; ++i)
|
||||
{
|
||||
int compareResult = 0;
|
||||
|
||||
if (_ignoreCase)
|
||||
{
|
||||
generic_string kwSufix = _keyWordArray[i].substr(0, len);
|
||||
compareResult = wcsicmp(beginChars, kwSufix.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
compareResult = _keyWordArray[i].compare(0, len, beginChars);
|
||||
}
|
||||
|
||||
if (compareResult == 0)
|
||||
{
|
||||
if (!isInList(_keyWordArray[i], wordArray))
|
||||
wordArray.push_back(_keyWordArray[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!wordArray.size())
|
||||
return false;
|
||||
|
||||
// Sort word array and convert it to a single string with space-separated words
|
||||
|
||||
if (_ignoreCase)
|
||||
sortInsensitive(wordArray);
|
||||
else
|
||||
sort(wordArray.begin(), wordArray.end());
|
||||
|
||||
generic_string words;
|
||||
|
||||
for (size_t i = 0, wordArrayLen = wordArray.size(); i < wordArrayLen; ++i)
|
||||
if (autocType == autocFunc)
|
||||
{
|
||||
words += wordArray[i];
|
||||
if (i != wordArrayLen - 1)
|
||||
words += TEXT(" ");
|
||||
if (len >= _keyWordMaxLen)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
const size_t bufSize = 256;
|
||||
if (len >= bufSize)
|
||||
return false;
|
||||
|
||||
intptr_t endPos = _pEditView->execute(SCI_WORDENDPOSITION, curPos, true);
|
||||
|
||||
size_t lena = (endPos > startPos)?(endPos - startPos):(startPos - endPos);
|
||||
if (lena >= bufSize)
|
||||
return false;
|
||||
|
||||
TCHAR beginChars[bufSize];
|
||||
_pEditView->getGenericText(beginChars, bufSize, startPos, curPos);
|
||||
|
||||
// Get word array containing all words beginning with beginChars, excluding word equal to allChars
|
||||
|
||||
vector<generic_string> wordArray;
|
||||
|
||||
if (autocType == autocWord || autocType == autocFuncAndWord)
|
||||
{
|
||||
TCHAR allChars[bufSize];
|
||||
_pEditView->getGenericText(allChars, bufSize, startPos, endPos);
|
||||
getWordArray(wordArray, beginChars, allChars);
|
||||
}
|
||||
|
||||
// Add keywords to word array
|
||||
|
||||
if (autocType == autocFuncBrief || autocType == autocFuncAndWord)
|
||||
{
|
||||
for (size_t i = 0, kwlen = _keyWordArray.size(); i < kwlen; ++i)
|
||||
|
||||
{
|
||||
int compareResult = 0;
|
||||
|
||||
if (_ignoreCase)
|
||||
{
|
||||
generic_string kwSufix = _keyWordArray[i].substr(0, len);
|
||||
compareResult = wcsicmp(beginChars, kwSufix.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
compareResult = _keyWordArray[i].compare(0, len, beginChars);
|
||||
}
|
||||
|
||||
if (compareResult == 0)
|
||||
{
|
||||
if (!isInList(_keyWordArray[i], wordArray))
|
||||
wordArray.push_back(_keyWordArray[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!wordArray.size())
|
||||
return false;
|
||||
|
||||
// Optionally, auto-insert word
|
||||
|
||||
if (autocType == autocWord && wordArray.size() == 1 && autoInsert)
|
||||
{
|
||||
intptr_t replacedLength = _pEditView->replaceTarget(wordArray[0].c_str(), startPos, curPos);
|
||||
_pEditView->execute(SCI_GOTOPOS, startPos + replacedLength);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Sort word array and convert it to a single string with space-separated words
|
||||
|
||||
if (autocType == autocWord || autocType & autocFuncAndWord)
|
||||
{
|
||||
if (_ignoreCase)
|
||||
sortInsensitive(wordArray);
|
||||
else
|
||||
sort(wordArray.begin(), wordArray.end());
|
||||
}
|
||||
|
||||
for (size_t i = 0, wordArrayLen = wordArray.size(); i < wordArrayLen; ++i)
|
||||
{
|
||||
words += wordArray[i];
|
||||
if (i != wordArrayLen - 1)
|
||||
words += TEXT(" ");
|
||||
}
|
||||
}
|
||||
|
||||
// Make Scintilla show the autocompletion menu
|
||||
|
@ -439,10 +422,24 @@ bool AutoCompletion::showApiAndWordComplete()
|
|||
_pEditView->execute(SCI_AUTOCSETSEPARATOR, WPARAM(' '));
|
||||
_pEditView->execute(SCI_AUTOCSETIGNORECASE, _ignoreCase);
|
||||
_pEditView->execute(SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR, _ignoreCase);
|
||||
_pEditView->showAutoComletion(curPos - startPos, words.c_str());
|
||||
|
||||
if (autocType == autocFunc)
|
||||
_pEditView->showAutoComletion(curPos - startPos, _keyWords.c_str());
|
||||
else
|
||||
_pEditView->showAutoComletion(curPos - startPos, words.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AutoCompletion::showApiComplete()
|
||||
{
|
||||
return showAutoComplete(autocFunc, false);
|
||||
}
|
||||
|
||||
bool AutoCompletion::showApiAndWordComplete()
|
||||
{
|
||||
return showAutoComplete(autocFuncAndWord, false);
|
||||
}
|
||||
|
||||
void AutoCompletion::getWordArray(vector<generic_string> & wordArray, TCHAR *beginChars, TCHAR *allChars)
|
||||
{
|
||||
|
@ -644,69 +641,7 @@ void AutoCompletion::showPathCompletion()
|
|||
|
||||
bool AutoCompletion::showWordComplete(bool autoInsert)
|
||||
{
|
||||
// Get beginning of word and complete word
|
||||
|
||||
intptr_t curPos = _pEditView->execute(SCI_GETCURRENTPOS);
|
||||
intptr_t startPos = _pEditView->execute(SCI_WORDSTARTPOSITION, curPos, true);
|
||||
intptr_t endPos = _pEditView->execute(SCI_WORDENDPOSITION, curPos, true);
|
||||
|
||||
if (curPos == startPos)
|
||||
return false;
|
||||
|
||||
const size_t bufSize = 256;
|
||||
TCHAR beginChars[bufSize];
|
||||
TCHAR allChars[bufSize];
|
||||
|
||||
size_t len = (curPos > startPos)?(curPos - startPos):(startPos - curPos);
|
||||
if (len >= bufSize)
|
||||
return false;
|
||||
|
||||
size_t lena = (endPos > startPos)?(endPos - startPos):(startPos - endPos);
|
||||
if (lena >= bufSize)
|
||||
return false;
|
||||
|
||||
_pEditView->getGenericText(beginChars, bufSize, startPos, curPos);
|
||||
_pEditView->getGenericText(allChars, bufSize, startPos, endPos);
|
||||
|
||||
// Get word array containing all words beginning with beginChars, excluding word equal to allChars
|
||||
|
||||
vector<generic_string> wordArray;
|
||||
getWordArray(wordArray, beginChars, allChars);
|
||||
|
||||
if (wordArray.size() == 0) return false;
|
||||
|
||||
// Optionally, auto-insert word
|
||||
|
||||
if (wordArray.size() == 1 && autoInsert)
|
||||
{
|
||||
intptr_t replacedLength = _pEditView->replaceTarget(wordArray[0].c_str(), startPos, curPos);
|
||||
_pEditView->execute(SCI_GOTOPOS, startPos + replacedLength);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Sort word array and convert it to a single string with space-separated words
|
||||
|
||||
if (_ignoreCase)
|
||||
sortInsensitive(wordArray);
|
||||
else
|
||||
sort(wordArray.begin(), wordArray.end());
|
||||
|
||||
generic_string words(TEXT(""));
|
||||
|
||||
for (size_t i = 0, wordArrayLen = wordArray.size(); i < wordArrayLen; ++i)
|
||||
{
|
||||
words += wordArray[i];
|
||||
if (i != wordArrayLen -1)
|
||||
words += TEXT(" ");
|
||||
}
|
||||
|
||||
// Make Scintilla show the autocompletion menu
|
||||
|
||||
_pEditView->execute(SCI_AUTOCSETSEPARATOR, WPARAM(' '));
|
||||
_pEditView->execute(SCI_AUTOCSETIGNORECASE, _ignoreCase);
|
||||
_pEditView->execute(SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR, _ignoreCase);
|
||||
_pEditView->showAutoComletion(curPos - startPos, words.c_str());
|
||||
return true;
|
||||
return showAutoComplete(autocWord, autoInsert);
|
||||
}
|
||||
|
||||
bool AutoCompletion::showFunctionComplete()
|
||||
|
@ -1075,7 +1010,7 @@ void AutoCompletion::update(int character)
|
|||
}
|
||||
|
||||
//If autocomplete already active, let Scintilla handle it
|
||||
if (_pEditView->execute(SCI_AUTOCACTIVE) != 0)
|
||||
if (!nppGUI._autocBrief && _pEditView->execute(SCI_AUTOCACTIVE) != 0)
|
||||
return;
|
||||
|
||||
const int wordSize = 64;
|
||||
|
@ -1087,7 +1022,10 @@ void AutoCompletion::update(int character)
|
|||
if (nppGUI._autocStatus == nppGUI.autoc_word)
|
||||
showWordComplete(false);
|
||||
else if (nppGUI._autocStatus == nppGUI.autoc_func)
|
||||
showApiComplete();
|
||||
if (nppGUI._autocBrief)
|
||||
showAutoComplete(autocFuncBrief, false);
|
||||
else
|
||||
showApiComplete();
|
||||
else if (nppGUI._autocStatus == nppGUI.autoc_both)
|
||||
showApiAndWordComplete();
|
||||
}
|
||||
|
|
|
@ -116,4 +116,15 @@ private:
|
|||
|
||||
const TCHAR * getApiFileName();
|
||||
void getWordArray(std::vector<generic_string> & wordArray, TCHAR *beginChars, TCHAR *excludeChars);
|
||||
|
||||
// Type of autocomplete function
|
||||
enum AutocompleteType {
|
||||
autocFunc,
|
||||
autocFuncAndWord,
|
||||
autocFuncBrief,
|
||||
autocWord
|
||||
};
|
||||
|
||||
// AutoComplete code merged into 1 function
|
||||
bool showAutoComplete(AutocompleteType autocType, bool autoInsert);
|
||||
};
|
||||
|
|
|
@ -376,7 +376,7 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
|||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL "Auto-indent",IDC_CHECK_MAINTAININDENT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,347,15,100,10
|
||||
GROUPBOX "Auto-Completion",IDD_AUTOC_GRPSTATIC,33,4,289,90,BS_CENTER
|
||||
GROUPBOX "Auto-Completion",IDD_AUTOC_GRPSTATIC,33,4,289,100,BS_CENTER
|
||||
CONTROL "Enable auto-completion on each input",IDD_AUTOC_ENABLECHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,38,15,150,10
|
||||
CONTROL "Function completion",IDD_AUTOC_FUNCRADIO,"Button",BS_AUTORADIOBUTTON | WS_GROUP,65,27,145,10
|
||||
CONTROL "Word completion",IDD_AUTOC_WORDRADIO,"Button",BS_AUTORADIOBUTTON,65,41,145,10
|
||||
|
@ -389,25 +389,26 @@ BEGIN
|
|||
CONTROL "TAB",IDD_AUTOC_USETAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,240,49,54,10
|
||||
CONTROL "ENTER",IDD_AUTOC_USEENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,240,61,55,10
|
||||
CONTROL "Ignore numbers",IDD_AUTOC_IGNORENUMBERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,219,79,80,10
|
||||
CONTROL "Function parameters hint on input",IDD_FUNC_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,38,79,160,10
|
||||
GROUPBOX "Auto-Insert",IDD_AUTOCINSERT_GRPSTATIC,33,99,289,84,BS_CENTER
|
||||
CONTROL " (",IDD_AUTOCPARENTHESES_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,48,120,24,10
|
||||
CONTROL " [",IDD_AUTOCBRACKET_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,48,138,24,10
|
||||
CONTROL " {",IDD_AUTOCCURLYBRACKET_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,48,157,24,10
|
||||
CONTROL " """,IDD_AUTOC_DOUBLEQUOTESCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,121,24,10
|
||||
CONTROL " '",IDD_AUTOC_QUOTESCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,138,24,10
|
||||
CONTROL " html/xml close tag",IDD_AUTOCTAG_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,157,76,10
|
||||
RTEXT "Open",IDC_MACHEDPAIROPEN_STATIC,254,108,25,8
|
||||
LTEXT "Close",IDC_MACHEDPAIRCLOSE_STATIC,292,108,25,8
|
||||
RTEXT "Matched pair 1:",IDC_MACHEDPAIR_STATIC1,195,122,70,8
|
||||
EDITTEXT IDC_MACHEDPAIROPEN_EDIT1,267,120,14,14
|
||||
EDITTEXT IDC_MACHEDPAIRCLOSE_EDIT1,295,120,14,14
|
||||
RTEXT "Matched pair 2:",IDC_MACHEDPAIR_STATIC2,195,142,70,8
|
||||
EDITTEXT IDC_MACHEDPAIROPEN_EDIT2,267,140,14,14
|
||||
EDITTEXT IDC_MACHEDPAIRCLOSE_EDIT2,295,140,14,14
|
||||
RTEXT "Matched pair 3:",IDC_MACHEDPAIR_STATIC3,195,162,70,8
|
||||
EDITTEXT IDC_MACHEDPAIROPEN_EDIT3,267,160,14,14
|
||||
EDITTEXT IDC_MACHEDPAIRCLOSE_EDIT3,295,160,14,14
|
||||
CONTROL "Make auto-completion list brief",IDD_AUTOC_BRIEF_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,38,69,160,10
|
||||
CONTROL "Function parameters hint on input",IDD_FUNC_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,38,88,160,10
|
||||
GROUPBOX "Auto-Insert",IDD_AUTOCINSERT_GRPSTATIC,33,109,289,84,BS_CENTER
|
||||
CONTROL " (",IDD_AUTOCPARENTHESES_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,48,130,24,10
|
||||
CONTROL " [",IDD_AUTOCBRACKET_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,48,148,24,10
|
||||
CONTROL " {",IDD_AUTOCCURLYBRACKET_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,48,167,24,10
|
||||
CONTROL " """,IDD_AUTOC_DOUBLEQUOTESCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,131,24,10
|
||||
CONTROL " '",IDD_AUTOC_QUOTESCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,148,24,10
|
||||
CONTROL " html/xml close tag",IDD_AUTOCTAG_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,167,76,10
|
||||
RTEXT "Open",IDC_MACHEDPAIROPEN_STATIC,254,118,25,8
|
||||
LTEXT "Close",IDC_MACHEDPAIRCLOSE_STATIC,292,118,25,8
|
||||
RTEXT "Matched pair 1:",IDC_MACHEDPAIR_STATIC1,195,132,70,8
|
||||
EDITTEXT IDC_MACHEDPAIROPEN_EDIT1,267,130,14,14
|
||||
EDITTEXT IDC_MACHEDPAIRCLOSE_EDIT1,295,130,14,14
|
||||
RTEXT "Matched pair 2:",IDC_MACHEDPAIR_STATIC2,195,152,70,8
|
||||
EDITTEXT IDC_MACHEDPAIROPEN_EDIT2,267,150,14,14
|
||||
EDITTEXT IDC_MACHEDPAIRCLOSE_EDIT2,295,150,14,14
|
||||
RTEXT "Matched pair 3:",IDC_MACHEDPAIR_STATIC3,195,172,70,8
|
||||
EDITTEXT IDC_MACHEDPAIROPEN_EDIT3,267,170,14,14
|
||||
EDITTEXT IDC_MACHEDPAIRCLOSE_EDIT3,295,170,14,14
|
||||
END
|
||||
|
||||
|
||||
|
|
|
@ -4024,7 +4024,7 @@ intptr_t CALLBACK AutoCompletionSubDlg::run_dlgProc(UINT message, WPARAM wParam,
|
|||
|
||||
if (nppGUI._autocStatus == nppGUI.autoc_word || nppGUI._autocStatus == nppGUI.autoc_both)
|
||||
::SendDlgItemMessage(_hSelf, IDD_AUTOC_IGNORENUMBERS, BM_SETCHECK, nppGUI._autocIgnoreNumbers ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||
|
||||
|
||||
::SendDlgItemMessage(_hSelf, IDD_AUTOC_USEENTER, BM_SETCHECK, nppGUI._autocInsertSelectedUseENTER ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||
::SendDlgItemMessage(_hSelf, IDD_AUTOC_USETAB, BM_SETCHECK, nppGUI._autocInsertSelectedUseTAB ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||
|
||||
|
@ -4040,6 +4040,7 @@ intptr_t CALLBACK AutoCompletionSubDlg::run_dlgProc(UINT message, WPARAM wParam,
|
|||
}
|
||||
::SendDlgItemMessage(_hSelf, IDC_CHECK_MAINTAININDENT, BM_SETCHECK, nppGUI._maitainIndent, 0);
|
||||
|
||||
::SendDlgItemMessage(_hSelf, IDD_AUTOC_BRIEF_CHECK, BM_SETCHECK, nppGUI._autocBrief ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||
::SendDlgItemMessage(_hSelf, IDD_FUNC_CHECK, BM_SETCHECK, nppGUI._funcParams ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||
|
||||
::SendDlgItemMessage(_hSelf, IDD_AUTOCPARENTHESES_CHECK, BM_SETCHECK, nppGUI._matchedPairConf._doParentheses?BST_CHECKED:BST_UNCHECKED, 0);
|
||||
|
@ -4217,6 +4218,8 @@ intptr_t CALLBACK AutoCompletionSubDlg::run_dlgProc(UINT message, WPARAM wParam,
|
|||
::SendDlgItemMessage(_hSelf, IDD_AUTOC_FUNCRADIO, BM_SETCHECK, BST_UNCHECKED, 0);
|
||||
::SendDlgItemMessage(_hSelf, IDD_AUTOC_WORDRADIO, BM_SETCHECK, BST_UNCHECKED, 0);
|
||||
::SendDlgItemMessage(_hSelf, IDD_AUTOC_BOTHRADIO, BM_SETCHECK, BST_UNCHECKED, 0);
|
||||
::SendDlgItemMessage(_hSelf, IDD_AUTOC_BRIEF_CHECK, BM_SETCHECK, BST_UNCHECKED, 0);
|
||||
nppGUI._autocBrief = false;
|
||||
nppGUI._autocStatus = nppGUI.autoc_none;
|
||||
|
||||
::SendDlgItemMessage(_hSelf, IDD_AUTOC_IGNORENUMBERS, BM_SETCHECK, BST_UNCHECKED, 0);
|
||||
|
@ -4225,6 +4228,7 @@ intptr_t CALLBACK AutoCompletionSubDlg::run_dlgProc(UINT message, WPARAM wParam,
|
|||
::EnableWindow(::GetDlgItem(_hSelf, IDD_AUTOC_FUNCRADIO), isEnableAutoC);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDD_AUTOC_WORDRADIO), isEnableAutoC);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDD_AUTOC_BOTHRADIO), isEnableAutoC);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDD_AUTOC_BRIEF_CHECK), isEnableAutoC);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDD_AUTOC_USEKEY_GRP_STATIC), isEnableAutoC);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDD_AUTOC_USEENTER), isEnableAutoC);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDD_AUTOC_USETAB), isEnableAutoC);
|
||||
|
@ -4241,7 +4245,8 @@ intptr_t CALLBACK AutoCompletionSubDlg::run_dlgProc(UINT message, WPARAM wParam,
|
|||
::SendDlgItemMessage(_hSelf, IDD_AUTOC_IGNORENUMBERS, BM_SETCHECK, BST_UNCHECKED, 0);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDD_AUTOC_IGNORENUMBERS), FALSE);
|
||||
nppGUI._autocIgnoreNumbers = false;
|
||||
|
||||
::SendDlgItemMessage(_hSelf, IDD_AUTOC_BRIEF_CHECK, BM_SETCHECK, BST_UNCHECKED, 0);
|
||||
nppGUI._autocBrief = false;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -4277,6 +4282,12 @@ intptr_t CALLBACK AutoCompletionSubDlg::run_dlgProc(UINT message, WPARAM wParam,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
case IDD_AUTOC_BRIEF_CHECK :
|
||||
{
|
||||
nppGUI._autocBrief = isCheckedOrNot(static_cast<int32_t>(wParam));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
case IDD_FUNC_CHECK :
|
||||
{
|
||||
nppGUI._funcParams = isCheckedOrNot(static_cast<int32_t>(wParam));
|
||||
|
|
|
@ -414,6 +414,7 @@
|
|||
#define IDD_AUTOC_USEKEY_GRP_STATIC (IDD_PREFERENCE_SUB_AUTOCOMPLETION + 19)
|
||||
#define IDD_AUTOC_USETAB (IDD_PREFERENCE_SUB_AUTOCOMPLETION + 20)
|
||||
#define IDD_AUTOC_USEENTER (IDD_PREFERENCE_SUB_AUTOCOMPLETION + 21)
|
||||
#define IDD_AUTOC_BRIEF_CHECK (IDD_PREFERENCE_SUB_AUTOCOMPLETION + 22)
|
||||
|
||||
#define IDD_PREFERENCE_SUB_SEARCHING 6900 //(IDD_PREFERENCE_BOX + 900)
|
||||
//#define IDC_CHECK_STOPFILLINGFINDFIELD (IDD_PREFERENCE_SUB_SEARCHING + 1)
|
||||
|
|
Loading…
Reference in New Issue