Enable auto-Indent for PowerShell

Fix #9049, close #9051
This commit is contained in:
Vince 2020-10-23 09:25:06 -04:00 committed by Don HO
parent dcc7ac5512
commit 073f0bc8c6
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E
1 changed files with 2 additions and 2 deletions

View File

@ -2953,7 +2953,7 @@ void Notepad_plus::maintainIndentation(TCHAR ch)
return;
if (type == L_C || type == L_CPP || type == L_JAVA || type == L_CS || type == L_OBJC ||
type == L_PHP || type == L_JS || type == L_JAVASCRIPT || type == L_JSP || type == L_CSS || type == L_PERL || type == L_RUST)
type == L_PHP || type == L_JS || type == L_JAVASCRIPT || type == L_JSP || type == L_CSS || type == L_PERL || type == L_RUST || type == L_POWERSHELL)
{
if (((eolMode == SC_EOL_CRLF || eolMode == SC_EOL_LF) && ch == '\n') ||
(eolMode == SC_EOL_CR && ch == '\r'))
@ -2996,7 +2996,7 @@ void Notepad_plus::maintainIndentation(TCHAR ch)
_pEditView->setLineIndent(curLine, indentAmountPrevLine);
}
// These languages do no support single line control structures without braces.
else if (type == L_PERL || type == L_RUST)
else if (type == L_PERL || type == L_RUST || L_POWERSHELL)
{
_pEditView->setLineIndent(curLine, indentAmountPrevLine);
}