Skip to content

Commit

Permalink
Fix incomplete change in commit 3601f88, issue #172.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Apr 4, 2020
1 parent b048e9d commit 662f89f
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 83 deletions.
14 changes: 7 additions & 7 deletions src/EditAutoC.c
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,7 @@ const char *EditKeywordIndent(const char *head, int *indent) {
switch (pLexCurrent->iLexer) {
//case SCLEX_AU3:
case SCLEX_BASH:
if (np2LexLangIndex == IDM_LANG_CSHELL) {
if (np2LexLangIndex == IDM_LEXER_CSHELL) {
if (!strcmp(word, "if")) {
*indent = 2;
endPart = "endif";
Expand Down Expand Up @@ -1791,7 +1791,7 @@ const char *EditKeywordIndent(const char *head, int *indent) {
*indent = 1;
} else if (!strcmp(word, "if") || !strcmp(word, "for") || !strcmp(word, "while") || !strcmp(word, "switch") || !strcmp(word, "try")) {
*indent = 2;
if (pLexCurrent->rid == NP2LEX_OCTAVE || np2LexLangIndex == IDM_LANG_OCTAVE) {
if (pLexCurrent->rid == NP2LEX_OCTAVE || np2LexLangIndex == IDM_LEXER_OCTAVE) {
if (strcmp(word, "if") == 0) {
endPart = "endif";
} else if (strcmp(word, "for") == 0) {
Expand Down Expand Up @@ -2050,7 +2050,7 @@ void EditToggleCommentLine(void) {
break;

case SCLEX_BASH:
EditToggleLineComments(((np2LexLangIndex == IDM_LANG_M4)? L"dnl " : L"#"), FALSE);
EditToggleLineComments(((np2LexLangIndex == IDM_LEXER_M4)? L"dnl " : L"#"), FALSE);
break;

case SCLEX_BATCH:
Expand Down Expand Up @@ -2133,7 +2133,7 @@ void EditToggleCommentLine(void) {
break;

case SCLEX_MATLAB:
if (pLexCurrent->rid == NP2LEX_SCILAB || np2LexLangIndex == IDM_LANG_SCILAB) {
if (pLexCurrent->rid == NP2LEX_SCILAB || np2LexLangIndex == IDM_LEXER_SCILAB) {
EditToggleLineComments(L"//", FALSE);
} else {
EditToggleLineComments(L"%", FALSE);
Expand Down Expand Up @@ -2280,7 +2280,7 @@ void EditToggleCommentBlock(void) {
break;

case SCLEX_MATLAB:
if (pLexCurrent->rid == NP2LEX_SCILAB || np2LexLangIndex == IDM_LANG_SCILAB) {
if (pLexCurrent->rid == NP2LEX_SCILAB || np2LexLangIndex == IDM_LEXER_SCILAB) {
EditEncloseSelection(L"/*", L"*/");
} else {
EditEncloseSelectionNewLine(L"%{", L"%}");
Expand Down Expand Up @@ -2309,11 +2309,11 @@ void EditInsertScriptShebangLine(void) {
switch (pLexCurrent->iLexer) {
case SCLEX_BASH:
switch (np2LexLangIndex) {
case IDM_LANG_CSHELL:
case IDM_LEXER_CSHELL:
prefix = "#!/bin/csh";
break;

case IDM_LANG_M4:
case IDM_LEXER_M4:
name = "m4";
break;

Expand Down
48 changes: 24 additions & 24 deletions src/EditAutoC_Data0.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,76 +484,76 @@ void Style_UpdateLexerKeywords(LPCEDITLEXER pLexNew) {
return;
}
switch (np2LexLangIndex) {
case IDM_LANG_XSD:
case IDM_LEXER_XSD:
np2_LexKeyword = &kwXmlSchema;
return;
case IDM_LANG_XSLT:
case IDM_LEXER_XSLT:
np2_LexKeyword = &kwXmlStylesheet;
return;

case IDM_LANG_ANT_BUILD:
case IDM_LEXER_ANT_BUILD:
np2_LexKeyword = &kwAntBuild;
return;
case IDM_LANG_MAVEN_POM:
case IDM_LEXER_MAVEN_POM:
np2_LexKeyword = &kwMavenPOM;
return;
case IDM_LANG_MAVEN_SETTINGS:
case IDM_LEXER_MAVEN_SETTINGS:
np2_LexKeyword = &kwMavenSettings;
return;
case IDM_LANG_IVY_MODULE:
case IDM_LEXER_IVY_MODULE:
np2_LexKeyword = &kwIvyModule;
return;
case IDM_LANG_IVY_SETTINGS:
case IDM_LEXER_IVY_SETTINGS:
np2_LexKeyword = &kwIvySettings;
return;
case IDM_LANG_PMD_RULESET:
case IDM_LEXER_PMD_RULESET:
np2_LexKeyword = &kwPMDRuleset;
return;
case IDM_LANG_CHECKSTYLE:
case IDM_LEXER_CHECKSTYLE:
np2_LexKeyword = &kwCheckstyle;
return;

case IDM_LANG_APACHE:
case IDM_LEXER_APACHE:
np2_LexKeyword = &kwApache;
return;
case IDM_LANG_TOMCAT:
case IDM_LEXER_TOMCAT:
np2_LexKeyword = &kwTomcat;
return;
case IDM_LANG_WEB_JAVA:
case IDM_LEXER_WEB_JAVA:
np2_LexKeyword = &kwJavaWebConfig;
return;
case IDM_LANG_STRUTS:
case IDM_LEXER_STRUTS:
np2_LexKeyword = &kwStruts;
return;
case IDM_LANG_HIB_CFG:
case IDM_LEXER_HIB_CFG:
np2_LexKeyword = &kwHibConfig;
return;
case IDM_LANG_HIB_MAP:
case IDM_LEXER_HIB_MAP:
np2_LexKeyword = &kwHibMapping;
return;
case IDM_LANG_SPRING_BEANS:
case IDM_LEXER_SPRING_BEANS:
np2_LexKeyword = &kwSpringBeans;
return;
case IDM_LANG_JBOSS:
case IDM_LEXER_JBOSS:
return;

//case IDM_LANG_WEB_NET:
//case IDM_LEXER_WEB_NET:
// return;
//case IDM_LANG_RESX:
//case IDM_LEXER_RESX:
// np2_LexKeyword = &kwXmlSchema;
// return;
//case IDM_LANG_XAML:
//case IDM_LEXER_XAML:
// return;

case IDM_LANG_PROPERTY_LIST:
case IDM_LEXER_PROPERTY_LIST:
np2_LexKeyword = &kwPList;
return;
case IDM_LANG_ANDROID_MANIFEST:
case IDM_LEXER_ANDROID_MANIFEST:
np2_LexKeyword = &kwAndroidManifest;
return;
case IDM_LANG_ANDROID_LAYOUT:
case IDM_LEXER_ANDROID_LAYOUT:
return;
//case IDM_LANG_SVG:
//case IDM_LEXER_SVG:
// return;
}
}
104 changes: 52 additions & 52 deletions src/Notepad2.c
Original file line number Diff line number Diff line change
Expand Up @@ -4365,58 +4365,58 @@ LRESULT MsgCommand(HWND hwnd, WPARAM wParam, LPARAM lParam) {
break;
#endif

case IDM_LANG_TEXTFILE:
case IDM_LANG_2NDTEXTFILE:
case IDM_LANG_APACHE:
case IDM_LANG_WEB:
case IDM_LANG_PHP:
case IDM_LANG_JSP:
case IDM_LANG_ASPX_CS:
case IDM_LANG_ASPX_VB:
case IDM_LANG_ASP_VBS:
case IDM_LANG_ASP_JS:
case IDM_LANG_XML:
case IDM_LANG_XSD:
case IDM_LANG_XSLT:
case IDM_LANG_DTD:

case IDM_LANG_ANT_BUILD:
case IDM_LANG_MAVEN_POM:
case IDM_LANG_MAVEN_SETTINGS:
case IDM_LANG_IVY_MODULE:
case IDM_LANG_IVY_SETTINGS:
case IDM_LANG_PMD_RULESET:
case IDM_LANG_CHECKSTYLE:

case IDM_LANG_TOMCAT:
case IDM_LANG_WEB_JAVA:
case IDM_LANG_STRUTS:
case IDM_LANG_HIB_CFG:
case IDM_LANG_HIB_MAP:
case IDM_LANG_SPRING_BEANS:
case IDM_LANG_JBOSS:

case IDM_LANG_WEB_NET:
case IDM_LANG_RESX:
case IDM_LANG_XAML:

case IDM_LANG_PROPERTY_LIST:
case IDM_LANG_ANDROID_MANIFEST:
case IDM_LANG_ANDROID_LAYOUT:
case IDM_LANG_SVG:

case IDM_LANG_BASH:
case IDM_LANG_CSHELL:
case IDM_LANG_M4:

case IDM_LANG_MATLAB:
case IDM_LANG_OCTAVE:
case IDM_LANG_SCILAB:

case IDM_LANG_CSS:
case IDM_LANG_SCSS:
case IDM_LANG_LESS:
case IDM_LANG_HSS:
case IDM_LEXER_TEXTFILE:
case IDM_LEXER_2NDTEXTFILE:
case IDM_LEXER_APACHE:
case IDM_LEXER_WEB:
case IDM_LEXER_PHP:
case IDM_LEXER_JSP:
case IDM_LEXER_ASPX_CS:
case IDM_LEXER_ASPX_VB:
case IDM_LEXER_ASP_VBS:
case IDM_LEXER_ASP_JS:
case IDM_LEXER_XML:
case IDM_LEXER_XSD:
case IDM_LEXER_XSLT:
case IDM_LEXER_DTD:

case IDM_LEXER_ANT_BUILD:
case IDM_LEXER_MAVEN_POM:
case IDM_LEXER_MAVEN_SETTINGS:
case IDM_LEXER_IVY_MODULE:
case IDM_LEXER_IVY_SETTINGS:
case IDM_LEXER_PMD_RULESET:
case IDM_LEXER_CHECKSTYLE:

case IDM_LEXER_TOMCAT:
case IDM_LEXER_WEB_JAVA:
case IDM_LEXER_STRUTS:
case IDM_LEXER_HIB_CFG:
case IDM_LEXER_HIB_MAP:
case IDM_LEXER_SPRING_BEANS:
case IDM_LEXER_JBOSS:

case IDM_LEXER_WEB_NET:
case IDM_LEXER_RESX:
case IDM_LEXER_XAML:

case IDM_LEXER_PROPERTY_LIST:
case IDM_LEXER_ANDROID_MANIFEST:
case IDM_LEXER_ANDROID_LAYOUT:
case IDM_LEXER_SVG:

case IDM_LEXER_BASH:
case IDM_LEXER_CSHELL:
case IDM_LEXER_M4:

case IDM_LEXER_MATLAB:
case IDM_LEXER_OCTAVE:
case IDM_LEXER_SCILAB:

case IDM_LEXER_CSS:
case IDM_LEXER_SCSS:
case IDM_LEXER_LESS:
case IDM_LEXER_HSS:
Style_SetLexerByLangIndex(LOWORD(wParam));
break;

Expand Down

0 comments on commit 662f89f

Please sign in to comment.