summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5857192..32aca84 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -246,7 +246,17 @@ void _ts_create_text_match_rows() {
ImGui::TableNextRow();
ImGui::TableNextColumn();
- ImGui::TableHeader("");
+
+ ImGui::SetCursorPosX(5);
+ ImGui::PushStyleColor(ImGuiCol_Text, {0,0,0,0.1f});
+ ImGui::TableHeader(file->file->collapsed ? "▶" : "▼");
+
+ ImGui::SameLine();
+ ImGui::Selectable("##nolabel", false, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowOverlap);
+ if (ImGui::IsItemClicked(ImGuiPopupFlags_MouseButtonLeft)) {
+ file->file->collapsed = !file->file->collapsed;
+ }
+ ImGui::PopStyleColor();
ImGui::TableNextColumn();
ImGui::TableHeader(file->file->path);
@@ -256,6 +266,8 @@ void _ts_create_text_match_rows() {
ImGui::TableHeader(match_info_txt);
}
+ if (file->file->collapsed) continue;
+
char match_nr[20];
snprintf(match_nr, 20, "#%d", item+1);