Skip to content

Commit aa722ad

Browse files
committed
Enabled syntax highlighting for Bash files.
1 parent 5fbfd2d commit aa722ad

File tree

8 files changed

+27
-11
lines changed

8 files changed

+27
-11
lines changed

FileList.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ bool IsTextFile(CString strFilePath)
146146
(_tcsicmp(lpszExtension, _T(".m")) == 0) ||
147147
(_tcsicmp(lpszExtension, _T(".md")) == 0) ||
148148
(_tcsicmp(lpszExtension, _T(".py")) == 0) ||
149+
(_tcsicmp(lpszExtension, _T(".sh")) == 0) ||
149150
(_tcsicmp(lpszExtension, _T(".sql")) == 0) ||
150151
(_tcsicmp(lpszExtension, _T(".php")) == 0) ||
151152
(_tcsicmp(lpszExtension, _T(".txt")) == 0) ||

IntelliFile.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ <h2>Supported Programming Languages</h2>
6565
<p>The following Programming Languages are supported by <em>IntelliFile</em>:</p>
6666
<ul>
6767
<li>ASP</li>
68+
<li>Bash</li>
6869
<li>Batch</li>
6970
<li>C/C++</li>
7071
<li>C#</li>

ViewTextFileDlg.cpp

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -318,35 +318,49 @@ BOOL CViewTextFileDlg::OnInitDialog()
318318
}
319319
else
320320
{
321-
if (_tcsicmp(lpszExtension, _T(".sql")) == 0)
321+
if (_tcsicmp(lpszExtension, _T(".sh")) == 0)
322322
{
323-
// Create the SQL Lexer
323+
// Create the Shell Lexer
324324
#pragma warning(suppress: 26429)
325-
m_pLexer = theApp.m_pCreateLexer("sql");
325+
m_pLexer = theApp.m_pCreateLexer("bash");
326326
if (m_pLexer == nullptr)
327327
return FALSE;
328328

329-
// Setup the SQL Lexer
329+
// Setup the Shell Lexer
330330
m_ctrlTextFile.SetILexer(m_pLexer);
331-
m_ctrlTextFile.SetKeyWords(0, g_sqlKeywords);
332331
}
333332
else
334333
{
335-
if (_tcsicmp(lpszExtension, _T(".xml")) == 0)
334+
if (_tcsicmp(lpszExtension, _T(".sql")) == 0)
336335
{
337-
// Create the XML Lexer
336+
// Create the SQL Lexer
338337
#pragma warning(suppress: 26429)
339-
m_pLexer = theApp.m_pCreateLexer("xml");
338+
m_pLexer = theApp.m_pCreateLexer("sql");
340339
if (m_pLexer == nullptr)
341340
return FALSE;
342341

343-
// Setup the XML Lexer
342+
// Setup the SQL Lexer
344343
m_ctrlTextFile.SetILexer(m_pLexer);
344+
m_ctrlTextFile.SetKeyWords(0, g_sqlKeywords);
345345
}
346346
else
347347
{
348-
m_ctrlTextFile.SetupDirectAccess();
349-
m_ctrlTextFile.SetILexer(nullptr);
348+
if (_tcsicmp(lpszExtension, _T(".xml")) == 0)
349+
{
350+
// Create the XML Lexer
351+
#pragma warning(suppress: 26429)
352+
m_pLexer = theApp.m_pCreateLexer("xml");
353+
if (m_pLexer == nullptr)
354+
return FALSE;
355+
356+
// Setup the XML Lexer
357+
m_ctrlTextFile.SetILexer(m_pLexer);
358+
}
359+
else
360+
{
361+
m_ctrlTextFile.SetupDirectAccess();
362+
m_ctrlTextFile.SetILexer(nullptr);
363+
}
350364
}
351365
}
352366
}

hlp/IntelliFile.chm

0 Bytes
Binary file not shown.

x64/Release/IntelliFile.chm

0 Bytes
Binary file not shown.

x64/Release/IntelliFile.exe

0 Bytes
Binary file not shown.

x64/Release/Lexilla.dll

0 Bytes
Binary file not shown.

x64/Release/Scintilla.dll

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)