From b84007b0bc5fe286c96c675f5c2c210cccbc0490 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sun, 10 Mar 2024 09:29:45 +0100 Subject: set clipboard impl --- src/main.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index dc9bf8f..5857192 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -289,10 +289,8 @@ void _ts_create_text_match_rows() { ImGui::SameLine(); ImGui::Selectable("##nolabel", false, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowOverlap); - static bool context_menu_open = false; if (ImGui::IsItemClicked(ImGuiPopupFlags_MouseButtonRight)) { ImGui::OpenPopup(match_nr); - context_menu_open = true; } if (ImGui::BeginPopup(match_nr)) { @@ -307,11 +305,11 @@ void _ts_create_text_match_rows() { #endif if (ImGui::MenuItem("Copy path")) { - ts_platform_copy_to_clipboard(file->file->path); + ImGui::SetClipboardText(file->file->path); } if (ImGui::MenuItem("Copy line")) { - ts_platform_copy_to_clipboard(file->line_info); + ImGui::SetClipboardText(file->line_info); } ImGui::EndPopup(); } -- cgit v1.2.3-70-g09d2