Fix a typo

This commit is contained in:
Don Ho 2024-05-10 23:18:55 +02:00
parent ec7c5cec42
commit ee3aecb161
5 changed files with 11 additions and 10 deletions

View File

@ -3252,7 +3252,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
case NPPM_ISAUTOINDENTON: case NPPM_ISAUTOINDENTON:
{ {
return nppParam.getNppGUI()._maitainIndent; return nppParam.getNppGUI()._maintainIndent;
} }
case NPPM_ISDARKMODEENABLED: case NPPM_ISDARKMODEENABLED:

View File

@ -692,7 +692,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
if (!_recordingMacro && !_playingBackMacro) // No macro recording or playing back if (!_recordingMacro && !_playingBackMacro) // No macro recording or playing back
{ {
const NppGUI & nppGui = NppParameters::getInstance().getNppGUI(); const NppGUI & nppGui = NppParameters::getInstance().getNppGUI();
bool indentMaintain = nppGui._maitainIndent; bool indentMaintain = nppGui._maintainIndent;
if (indentMaintain) if (indentMaintain)
maintainIndentation(static_cast<TCHAR>(notification->ch)); maintainIndentation(static_cast<TCHAR>(notification->ch));

View File

@ -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(); TiXmlNode *n = childNode->FirstChild();
if (n) if (n)
@ -5072,9 +5073,9 @@ void NppParameters::feedGUIParameters(TiXmlNode *node)
if (val) if (val)
{ {
if (lstrcmp(val, TEXT("yes")) == 0) if (lstrcmp(val, TEXT("yes")) == 0)
_nppGUI._maitainIndent = true; _nppGUI._maintainIndent = true;
else else
_nppGUI._maitainIndent = false; _nppGUI._maintainIndent = false;
} }
} }
} }
@ -7225,9 +7226,9 @@ void NppParameters::createXmlTreeFromGUIParams()
insertGUIConfigBoolNode(newGUIRoot, TEXT("TrayIcon"), _nppGUI._isMinimizedToTray); insertGUIConfigBoolNode(newGUIRoot, TEXT("TrayIcon"), _nppGUI._isMinimizedToTray);
} }
// <GUIConfig name="MaitainIndent">yes</GUIConfig> // <GUIConfig name="MaintainIndent">yes</GUIConfig>
{ {
insertGUIConfigBoolNode(newGUIRoot, TEXT("MaitainIndent"), _nppGUI._maitainIndent); insertGUIConfigBoolNode(newGUIRoot, TEXT("MaintainIndent"), _nppGUI._maintainIndent);
} }
// <GUIConfig name = "TagsMatchHighLight" TagAttrHighLight = "yes" HighLightNonHtmlZone = "no">yes< / GUIConfig> // <GUIConfig name = "TagsMatchHighLight" TagAttrHighLight = "yes" HighLightNonHtmlZone = "no">yes< / GUIConfig>

View File

@ -809,7 +809,7 @@ struct NppGUI final
bool _saveAllConfirm = true; bool _saveAllConfirm = true;
bool _setSaveDlgExtFiltToAllTypes = false; bool _setSaveDlgExtFiltToAllTypes = false;
bool _doTaskList = true; bool _doTaskList = true;
bool _maitainIndent = true; bool _maintainIndent = true;
bool _enableSmartHilite = true; bool _enableSmartHilite = true;
bool _smartHiliteCaseSensitive = false; bool _smartHiliteCaseSensitive = false;

View File

@ -4514,7 +4514,7 @@ intptr_t CALLBACK AutoCompletionSubDlg::run_dlgProc(UINT message, WPARAM wParam,
::EnableWindow(::GetDlgItem(_hSelf, IDD_AUTOC_USEKEY_GRP_STATIC), FALSE); ::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_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); ::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: case IDC_CHECK_MAINTAININDENT:
{ {
nppGUI._maitainIndent = isCheckedOrNot(IDC_CHECK_MAINTAININDENT); nppGUI._maintainIndent = isCheckedOrNot(IDC_CHECK_MAINTAININDENT);
return TRUE; return TRUE;
} }