fix(history): select commits from message cells

This commit is contained in:
2026-06-18 20:03:48 -05:00
parent 23a60061f6
commit cd1072362f

View File

@@ -828,7 +828,13 @@ void draw_commit_table() {
ImGui::TableSetColumnIndex(1);
graph.drawRow(i, commit, repo().commits, row_heights, parent_rows, g_avatar_cache);
ImGui::TableSetColumnIndex(2);
ImGui::TextUnformatted(commit.summary.c_str());
ImGui::PushID(i);
const ImVec2 message_position = ImGui::GetCursorScreenPos();
ImGui::InvisibleButton("##commit_message", {-1, std::max(ImGui::GetTextLineHeight(), row_height - ui(2.0f))});
if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) repo().selected_commit = i;
ImGui::GetWindowDrawList()->AddText(message_position, ImGui::GetColorU32(ImGuiCol_Text),
commit.summary.c_str());
ImGui::PopID();
ImGui::TableSetColumnIndex(3);
ImGui::TextDisabled("%s", commit.date.c_str());
}