Skip to content

Commit

Permalink
Fix a typo
Browse files Browse the repository at this point in the history
  • Loading branch information
donho committed May 10, 2024
1 parent ec7c5ce commit ee3aecb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion PowerEditor/src/NppBigSwitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion PowerEditor/src/NppNotification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<TCHAR>(notification->ch));

Expand Down
11 changes: 6 additions & 5 deletions PowerEditor/src/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
}
}
}
Expand Down Expand Up @@ -7225,9 +7226,9 @@ void NppParameters::createXmlTreeFromGUIParams()
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>
Expand Down
2 changes: 1 addition & 1 deletion PowerEditor/src/Parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions PowerEditor/src/WinControls/Preference/preferenceDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit ee3aecb

Please sign in to comment.