Increase Keyword Set for the adaptation of new updated Scintilla
This will enable languages having more than 7 keyword sets to use it. "You can set up to 9 lists of keywords for use by the current lexer. keyWordSet can be 0 to 8" : https://www.scintilla.org/ScintillaDoc.html#SCI_SETKEYWORDS Fix #6020, close #6081
This commit is contained in:
parent
e102ecb919
commit
d5c0ef2c77
@ -550,6 +550,8 @@ int getKwClassFromName(const TCHAR *str)
|
||||
if (!lstrcmp(TEXT("type3"), str)) return LANG_INDEX_TYPE3;
|
||||
if (!lstrcmp(TEXT("type4"), str)) return LANG_INDEX_TYPE4;
|
||||
if (!lstrcmp(TEXT("type5"), str)) return LANG_INDEX_TYPE5;
|
||||
if (!lstrcmp(TEXT("type6"), str)) return LANG_INDEX_TYPE6;
|
||||
if (!lstrcmp(TEXT("type7"), str)) return LANG_INDEX_TYPE7;
|
||||
|
||||
if ((str[1] == '\0') && (str[0] >= '0') && (str[0] <= '8')) // up to KEYWORDSET_MAX
|
||||
return str[0] - '0';
|
||||
|
@ -99,6 +99,8 @@ const int LANG_INDEX_TYPE2 = 3;
|
||||
const int LANG_INDEX_TYPE3 = 4;
|
||||
const int LANG_INDEX_TYPE4 = 5;
|
||||
const int LANG_INDEX_TYPE5 = 6;
|
||||
const int LANG_INDEX_TYPE6 = 7;
|
||||
const int LANG_INDEX_TYPE7 = 8;
|
||||
|
||||
const int COPYDATA_PARAMS = 0;
|
||||
const int COPYDATA_FILENAMESA = 1;
|
||||
|
@ -1226,6 +1226,19 @@ void ScintillaEditView::setLexer(int lexerID, LangType langType, int whichList)
|
||||
const char * keyWords_char = wmc.wchar2char(pKwArray[LANG_INDEX_TYPE5], CP_ACP);
|
||||
setKeywords(langType, keyWords_char, LANG_INDEX_TYPE5);
|
||||
}
|
||||
|
||||
if (whichList & LIST_7)
|
||||
{
|
||||
const char * keyWords_char = wmc.wchar2char(pKwArray[LANG_INDEX_TYPE6], CP_ACP);
|
||||
setKeywords(langType, keyWords_char, LANG_INDEX_TYPE6);
|
||||
}
|
||||
|
||||
if (whichList & LIST_8)
|
||||
{
|
||||
const char * keyWords_char = wmc.wchar2char(pKwArray[LANG_INDEX_TYPE7], CP_ACP);
|
||||
setKeywords(langType, keyWords_char, LANG_INDEX_TYPE7);
|
||||
}
|
||||
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold"), reinterpret_cast<LPARAM>("1"));
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold.compact"), reinterpret_cast<LPARAM>("0"));
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold.comment"), reinterpret_cast<LPARAM>("1"));
|
||||
|
@ -95,6 +95,8 @@ const int CP_GREEK = 1253;
|
||||
#define LIST_4 16
|
||||
#define LIST_5 32
|
||||
#define LIST_6 64
|
||||
#define LIST_7 128
|
||||
#define LIST_8 256
|
||||
|
||||
const bool fold_uncollapse = true;
|
||||
const bool fold_collapse = false;
|
||||
|
Loading…
Reference in New Issue
Block a user