Fix copying commands retaining the "> "
@@ -73,7 +73,13 @@ void Overlay::DrawImgui(IDXGISwapChain3* apSwapChain)
const auto result = ImGui::ListBoxHeader("", listboxSize);
for (auto& item : m_outputLines)
if (ImGui::Selectable(item.c_str()))
- std::strncpy(command, item.c_str(), sizeof(command) - 1);
+ {
+ auto str = item;
+ if (item[0] == '>' && item[1] == ' ')
+ str = str.substr(2);
+
+ std::strncpy(command, str.c_str(), sizeof(command) - 1);
+ }
if (m_outputScroll)
{
