mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
debugger/qt, debugger/win: Fixed suppressing trailing whitespace in copied text on completely blank lnes (most noticeable for the console view).
This commit is contained in:
parent
55d43402ab
commit
839d2e69e9
@ -331,8 +331,8 @@ void DebuggerView::copyVisibleSlot()
|
||||
for (uint32_t col = 0; col < visarea.x; ++col)
|
||||
text += wchar_t(viewdata[col].byte);
|
||||
std::string::size_type const nonblank = text.find_last_not_of("\t\n\v\r ");
|
||||
if ((nonblank != std::string::npos) && (nonblank >= start))
|
||||
text.resize(nonblank + 1);
|
||||
if (nonblank != std::string::npos)
|
||||
text.resize((std::max)(nonblank + 1, start));
|
||||
text += "\n";
|
||||
}
|
||||
|
||||
|
@ -320,8 +320,8 @@ void debugview_info::handle_context_menu(unsigned command)
|
||||
for (uint32_t col = 0; col < visarea.x; ++col)
|
||||
text += wchar_t(viewdata[col].byte);
|
||||
std::wstring::size_type const nonblank = text.find_last_not_of(L"\t\n\v\r ");
|
||||
if ((nonblank != std::wstring::npos) && (nonblank >= start))
|
||||
text.resize(nonblank + 1);
|
||||
if (nonblank != std::wstring::npos)
|
||||
text.resize((std::max)(start, nonblank + 1));
|
||||
text += L"\r\n";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user