From fdf3ed271472bcfd11e8d06e8c548f15d87616ed Mon Sep 17 00:00:00 2001 From: Don Ho Date: Mon, 9 Dec 2024 13:27:19 +0100 Subject: [PATCH] Add Swift, TypeScript, and Go for advanced Auto-indent Fix #15900, close #15925 --- PowerEditor/src/Notepad_plus.cpp | 3 ++- PowerEditor/src/WinControls/Preference/preferenceDlg.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 6d8bb8c1e8ae..bd47b92a7774 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -3632,7 +3632,8 @@ void Notepad_plus::maintainIndentation(wchar_t ch) 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_POWERSHELL || type == L_JSON || type == L_JSON5 || autoIndentMode == ExternalLexerAutoIndentMode::C_Like) + type == L_RUST || type == L_POWERSHELL || type == L_JSON || type == L_JSON5 || type == L_TYPESCRIPT || type == L_GOLANG || type == L_SWIFT || + autoIndentMode == ExternalLexerAutoIndentMode::C_Like) { if (((eolMode == SC_EOL_CRLF || eolMode == SC_EOL_LF) && ch == '\n') || (eolMode == SC_EOL_CR && ch == '\r')) diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp index abaa06bc9fed..6e3e074146c4 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp @@ -3298,7 +3298,7 @@ intptr_t CALLBACK IndentationSubDlg::run_dlgProc(UINT message, WPARAM wParam, LP wstring tipAutoIndentAdvanced2show = pNativeSpeaker->getLocalizedStrFromID("autoIndentAdvanced-tip", L"Enable smart indentation for \"C-like\" languages and Python. The \"C-like\" languages include:\n"\ - L"C, C++, Java, C#, Objective-C, PHP, JavaScript, JSP, CSS, Perl, Rust, PowerShell and JSON.\n"\ + L"C, C++, Java, C#, Objective-C, PHP, JavaScript, JSP, CSS, Perl, Rust, PowerShell, TypeScript, Go, Swift and JSON.\n"\ L"\n"\ L"If you select advanced mode but do not edit files in the aforementioned languages, the indentation will remain in basic mode.");