From ee3aecb161c24f58eb1a01ed9df0abd1e1acb08e Mon Sep 17 00:00:00 2001 From: Don Ho Date: Fri, 10 May 2024 23:18:55 +0200 Subject: [PATCH] Fix a typo --- PowerEditor/src/NppBigSwitch.cpp | 2 +- PowerEditor/src/NppNotification.cpp | 2 +- PowerEditor/src/Parameters.cpp | 11 ++++++----- PowerEditor/src/Parameters.h | 2 +- .../src/WinControls/Preference/preferenceDlg.cpp | 4 ++-- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/PowerEditor/src/NppBigSwitch.cpp b/PowerEditor/src/NppBigSwitch.cpp index e7ceaab10..799052317 100644 --- a/PowerEditor/src/NppBigSwitch.cpp +++ b/PowerEditor/src/NppBigSwitch.cpp @@ -3252,7 +3252,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa case NPPM_ISAUTOINDENTON: { - return nppParam.getNppGUI()._maitainIndent; + return nppParam.getNppGUI()._maintainIndent; } case NPPM_ISDARKMODEENABLED: diff --git a/PowerEditor/src/NppNotification.cpp b/PowerEditor/src/NppNotification.cpp index ae3a4cecb..80d18be28 100644 --- a/PowerEditor/src/NppNotification.cpp +++ b/PowerEditor/src/NppNotification.cpp @@ -692,7 +692,7 @@ BOOL Notepad_plus::notify(SCNotification *notification) if (!_recordingMacro && !_playingBackMacro) // No macro recording or playing back { const NppGUI & nppGui = NppParameters::getInstance().getNppGUI(); - bool indentMaintain = nppGui._maitainIndent; + bool indentMaintain = nppGui._maintainIndent; if (indentMaintain) maintainIndentation(static_cast(notification->ch)); diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index 016f93a2a..75e8f48b2 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -5063,7 +5063,8 @@ void NppParameters::feedGUIParameters(TiXmlNode *node) } } } - else if (lstrcmp(nm, TEXT("MaitainIndent")) == 0) + else if (lstrcmp(nm, TEXT("MaintainIndent")) == 0 || + lstrcmp(nm, TEXT("MaitainIndent")) == 0) // typo - kept for the compatibility reason { TiXmlNode *n = childNode->FirstChild(); if (n) @@ -5072,9 +5073,9 @@ void NppParameters::feedGUIParameters(TiXmlNode *node) if (val) { if (lstrcmp(val, TEXT("yes")) == 0) - _nppGUI._maitainIndent = true; + _nppGUI._maintainIndent = true; else - _nppGUI._maitainIndent = false; + _nppGUI._maintainIndent = false; } } } @@ -7225,9 +7226,9 @@ void NppParameters::createXmlTreeFromGUIParams() insertGUIConfigBoolNode(newGUIRoot, TEXT("TrayIcon"), _nppGUI._isMinimizedToTray); } - // yes + // yes { - insertGUIConfigBoolNode(newGUIRoot, TEXT("MaitainIndent"), _nppGUI._maitainIndent); + insertGUIConfigBoolNode(newGUIRoot, TEXT("MaintainIndent"), _nppGUI._maintainIndent); } // yes< / GUIConfig> diff --git a/PowerEditor/src/Parameters.h b/PowerEditor/src/Parameters.h index 89af827ab..bc348874f 100644 --- a/PowerEditor/src/Parameters.h +++ b/PowerEditor/src/Parameters.h @@ -809,7 +809,7 @@ struct NppGUI final bool _saveAllConfirm = true; bool _setSaveDlgExtFiltToAllTypes = false; bool _doTaskList = true; - bool _maitainIndent = true; + bool _maintainIndent = true; bool _enableSmartHilite = true; bool _smartHiliteCaseSensitive = false; diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp index d687c7559..1b5dd4068 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp @@ -4514,7 +4514,7 @@ intptr_t CALLBACK AutoCompletionSubDlg::run_dlgProc(UINT message, WPARAM wParam, ::EnableWindow(::GetDlgItem(_hSelf, IDD_AUTOC_USEKEY_GRP_STATIC), FALSE); } } - ::SendDlgItemMessage(_hSelf, IDC_CHECK_MAINTAININDENT, BM_SETCHECK, nppGUI._maitainIndent, 0); + ::SendDlgItemMessage(_hSelf, IDC_CHECK_MAINTAININDENT, BM_SETCHECK, nppGUI._maintainIndent, 0); ::SendDlgItemMessage(_hSelf, IDD_AUTOC_BRIEF_CHECK, BM_SETCHECK, nppGUI._autocBrief ? BST_CHECKED : BST_UNCHECKED, 0); ::SendDlgItemMessage(_hSelf, IDD_FUNC_CHECK, BM_SETCHECK, nppGUI._funcParams ? BST_CHECKED : BST_UNCHECKED, 0); @@ -4673,7 +4673,7 @@ intptr_t CALLBACK AutoCompletionSubDlg::run_dlgProc(UINT message, WPARAM wParam, { case IDC_CHECK_MAINTAININDENT: { - nppGUI._maitainIndent = isCheckedOrNot(IDC_CHECK_MAINTAININDENT); + nppGUI._maintainIndent = isCheckedOrNot(IDC_CHECK_MAINTAININDENT); return TRUE; }