--- a\np2src\Notepad2.dsp Sat Nov 01 10:45:50 2008
+++ b\np2src\Notepad2.dsp Sat Nov 01 11:14:16 2008
@@ -228,8 +228,14 @@ SOURCE=.\scintilla\src\KeyWords.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LexAsm.cxx
# End Source File
+# Begin Source File
+SOURCE=.\scintilla\src\LexAU3.cxx
+# End Source File
+# Begin Source File
+SOURCE=.\scintilla\src\LexBash.cxx
+# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LexConf.cxx
# End Source File
# Begin Source File
--- a\np2src\Notepad2.vcproj Fri Oct 31 00:00:00 2008
+++ b\np2src\Notepad2.vcproj Sat Nov 01 11:14:26 2008
@@ -319,8 +319,14 @@
+
+
+
+
iLexer != SCLEX_NULL) {
+ if (pLexNew->iLexer != SCLEX_NULL ||
+ pLexNew->Styles[1].iStyle == -1) { // null lexer w/ only 1 entry is just trying to override the default font
Style_SetStyles(hwnd,pLexNew->Styles[0].iStyle,pLexNew->Styles[0].szValue); } // lexer default
SendMessage(hwnd,SCI_STYLECLEARALL,0,0);
Style_SetStyles(hwnd,lexDefault.Styles[1+iIdx].iStyle,lexDefault.Styles[1+iIdx].szValue); // linenumber
@@ -1739,9 +1924,13 @@ void Style_SetLexerFromFile(HWND hwnd,LP
// Unix is case-sensitive, and the shebang should be too; to make it
// case-insensitive, bitwise-or by 0x20202020 before comparing
// 0x6C726570 == "perl", 0x6E6F6874 == "thon", and 0x6873 == "sh"
- if ((psz - tchText) >= 6) {
+ if ((psz - tchText) >= 4 && *((UNALIGNED PWORD)(psz - 2)) == 0x6873) {
+ pLexNew = &lexBASH;
+ bFound = TRUE;
+ }
+ else if ((psz - tchText) >= 6) {
switch (*((UNALIGNED PDWORD)(psz - 4))) {
case 0x6C726570:
pLexNew = &lexPL;
bFound = TRUE;
--- a\np2src\src\Styles.h Fri Oct 31 00:00:00 2008
+++ b\np2src\src\Styles.h Sat Nov 01 11:07:53 2008
@@ -48,9 +48,9 @@ typedef struct _editlexer
} EDITLEXER, *PEDITLEXER;
// Number of Lexers in pLexArray
-#define NUMLEXERS 21
+#define NUMLEXERS 25
void Style_Load();
void Style_Save();