Extend max asm line width, if needed.

This commit is contained in:
Bartosz Taudul 2022-05-09 00:44:45 +02:00
parent 76f3207bc4
commit bdd4d28770
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -2349,6 +2349,9 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStatData& as, Worker& worker
{ {
RenderAsmLine( m_asm[i], zero.ipMaxAsm, zero, worker, jumpOut, maxAddrLen, view ); RenderAsmLine( m_asm[i], zero.ipMaxAsm, zero, worker, jumpOut, maxAddrLen, view );
insList.emplace_back( m_asm[i].addr ); insList.emplace_back( m_asm[i].addr );
const auto win = ImGui::GetCurrentWindowRead();
const auto lineWidth = win->DC.CursorMaxPos.x - win->DC.CursorStartPos.x;
if( lineWidth > m_asmWidth ) m_asmWidth = lineWidth;
} }
} }
else else
@ -2360,6 +2363,9 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStatData& as, Worker& worker
const auto ipcnt = it == as.ipCountAsm.end() ? zero.ipMaxAsm : it->second; const auto ipcnt = it == as.ipCountAsm.end() ? zero.ipMaxAsm : it->second;
RenderAsmLine( line, ipcnt, as, worker, jumpOut, maxAddrLen, view ); RenderAsmLine( line, ipcnt, as, worker, jumpOut, maxAddrLen, view );
insList.emplace_back( line.addr ); insList.emplace_back( line.addr );
const auto win = ImGui::GetCurrentWindowRead();
const auto lineWidth = win->DC.CursorMaxPos.x - win->DC.CursorStartPos.x;
if( lineWidth > m_asmWidth ) m_asmWidth = lineWidth;
} }
} }
if( m_showJumps && !m_jumpTable.empty() && clipper.DisplayStart != clipper.DisplayEnd ) if( m_showJumps && !m_jumpTable.empty() && clipper.DisplayStart != clipper.DisplayEnd )