mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-01 11:04:40 +02:00
Fix UDL comment config input fields broken regression
Which caused by commit 94154b0f0e281b4bbfad9c59f8d01c9dff305c12. Fix #11239, close #11292
This commit is contained in:
parent
8132f4f3b0
commit
3482ed97ea
@ -535,11 +535,12 @@ void CommentStyleDialog::setKeywords2List(int id)
|
|||||||
IDC_COMMENT_CLOSE_EDIT
|
IDC_COMMENT_CLOSE_EDIT
|
||||||
};
|
};
|
||||||
|
|
||||||
for (size_t i = 0; i < sizeof(list)/sizeof(int); ++i)
|
TCHAR intBuffer[10] = { '0', 0 };
|
||||||
|
for (int i = 0; static_cast<size_t>(i) < sizeof(list) / sizeof(int); ++i)
|
||||||
{
|
{
|
||||||
wstring intStr = std::to_wstring(i);
|
generic_itoa(i, intBuffer + 1, 10);
|
||||||
::GetDlgItemText(_hSelf, list[i], buffer, max_char);
|
::GetDlgItemText(_hSelf, list[i], buffer, max_char);
|
||||||
convertTo(newList, max_char, buffer, intStr.c_str());
|
convertTo(newList, max_char, buffer, intBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
wcscpy_s(_pUserLang->_keywordLists[index], newList);
|
wcscpy_s(_pUserLang->_keywordLists[index], newList);
|
||||||
@ -597,10 +598,11 @@ void CommentStyleDialog::updateDlg()
|
|||||||
IDC_COMMENT_CLOSE_EDIT
|
IDC_COMMENT_CLOSE_EDIT
|
||||||
};
|
};
|
||||||
|
|
||||||
for (size_t i=0; i<sizeof(list)/sizeof(int); ++i)
|
TCHAR intBuffer[10] = { '0', 0 };
|
||||||
|
for (int i = 0; static_cast<size_t>(i) < sizeof(list) / sizeof(int); ++i)
|
||||||
{
|
{
|
||||||
wstring intStr = std::to_wstring(i);
|
generic_itoa(i, intBuffer + 1, 10);
|
||||||
retrieve(buffer, _pUserLang->_keywordLists[SCE_USER_KWLIST_COMMENTS], intStr.c_str());
|
retrieve(buffer, _pUserLang->_keywordLists[SCE_USER_KWLIST_COMMENTS], intBuffer);
|
||||||
::SendDlgItemMessage(_hSelf, list[i], WM_SETTEXT, 0, reinterpret_cast<LPARAM>(buffer));
|
::SendDlgItemMessage(_hSelf, list[i], WM_SETTEXT, 0, reinterpret_cast<LPARAM>(buffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user