Skip to content

Commit

Permalink
Fix column truncation in popup lists.
Browse files Browse the repository at this point in the history
Space was reserved for multiple columns when only 1 column was present.

Found while investigating #579.
  • Loading branch information
chrisant996 committed Mar 23, 2024
1 parent a351784 commit d95c84d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clink/lib/src/textlist_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,7 @@ void textlist_impl::update_display()
m_horz_scroll_range = 0;
m_horz_item_enabled = 0;
memset(m_horz_column_enabled, 0, sizeof(m_horz_column_enabled));
m_item_cells = max<int32>(0, min<int32>(m_longest, (m_mouse_width / 2) - m_max_num_cells));
m_item_cells = max<int32>(0, min<int32>(m_longest, (m_mouse_width / (m_has_columns ? 2 : 1)) - m_max_num_cells));

if (m_item_cells > 0)
{
Expand Down

0 comments on commit d95c84d

Please sign in to comment.