mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-29 16:54:43 +02:00
Fix a small regression in DebugInfo dialog
Remove "$COMMAND_LINE_PLACEHOLDER$ from the copied DebugInfo text. Fix #11752, close #11753
This commit is contained in:
parent
a02a254ea1
commit
b204be9012
@ -359,10 +359,10 @@ intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
|
|||||||
if ((GetKeyState(VK_LBUTTON) & 0x100) != 0)
|
if ((GetKeyState(VK_LBUTTON) & 0x100) != 0)
|
||||||
{
|
{
|
||||||
// Visual effect
|
// Visual effect
|
||||||
::SendDlgItemMessage(_hSelf, IDC_DEBUGINFO_EDIT, EM_SETSEL, 0, _debugInfoStr.length() - 1);
|
::SendDlgItemMessage(_hSelf, IDC_DEBUGINFO_EDIT, EM_SETSEL, 0, _debugInfoDisplay.length() - 1);
|
||||||
|
|
||||||
// Copy to clipboard
|
// Copy to clipboard
|
||||||
str2Clipboard(_debugInfoStr, _hSelf);
|
str2Clipboard(_debugInfoDisplay, _hSelf);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -394,17 +394,17 @@ void DebugInfoDlg::doDialog()
|
|||||||
|
|
||||||
void DebugInfoDlg::refreshDebugInfo()
|
void DebugInfoDlg::refreshDebugInfo()
|
||||||
{
|
{
|
||||||
generic_string debugInfoDisplay { _debugInfoStr };
|
_debugInfoDisplay = _debugInfoStr;
|
||||||
|
|
||||||
size_t replacePos = debugInfoDisplay.find(_cmdLinePlaceHolder);
|
size_t replacePos = _debugInfoDisplay.find(_cmdLinePlaceHolder);
|
||||||
if (replacePos != std::string::npos)
|
if (replacePos != std::string::npos)
|
||||||
{
|
{
|
||||||
debugInfoDisplay.replace(replacePos, _cmdLinePlaceHolder.length(), NppParameters::getInstance().getCmdLineString());
|
_debugInfoDisplay.replace(replacePos, _cmdLinePlaceHolder.length(), NppParameters::getInstance().getCmdLineString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set Debug Info text and leave the text in selected state
|
// Set Debug Info text and leave the text in selected state
|
||||||
::SetDlgItemText(_hSelf, IDC_DEBUGINFO_EDIT, debugInfoDisplay.c_str());
|
::SetDlgItemText(_hSelf, IDC_DEBUGINFO_EDIT, _debugInfoDisplay.c_str());
|
||||||
::SendDlgItemMessage(_hSelf, IDC_DEBUGINFO_EDIT, EM_SETSEL, 0, debugInfoDisplay.length() - 1);
|
::SendDlgItemMessage(_hSelf, IDC_DEBUGINFO_EDIT, EM_SETSEL, 0, _debugInfoDisplay.length() - 1);
|
||||||
::SetFocus(::GetDlgItem(_hSelf, IDC_DEBUGINFO_EDIT));
|
::SetFocus(::GetDlgItem(_hSelf, IDC_DEBUGINFO_EDIT));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,6 +82,7 @@ protected:
|
|||||||
private:
|
private:
|
||||||
typedef const CHAR * (__cdecl * PWINEGETVERSION)();
|
typedef const CHAR * (__cdecl * PWINEGETVERSION)();
|
||||||
generic_string _debugInfoStr;
|
generic_string _debugInfoStr;
|
||||||
|
generic_string _debugInfoDisplay;
|
||||||
const generic_string _cmdLinePlaceHolder { L"$COMMAND_LINE_PLACEHOLDER$" };
|
const generic_string _cmdLinePlaceHolder { L"$COMMAND_LINE_PLACEHOLDER$" };
|
||||||
bool _isAdmin = false;
|
bool _isAdmin = false;
|
||||||
generic_string _loadedPlugins;
|
generic_string _loadedPlugins;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user