diff --git a/thunar/thunar-tree-view.c b/thunar/thunar-tree-view.c index fa328eeb75de832ef61a459a06e540ffa5ac2fe3..117eaa827183d7301fd65feaf90bfdfcc34eb492 100644 --- a/thunar/thunar-tree-view.c +++ b/thunar/thunar-tree-view.c @@ -757,13 +757,19 @@ thunar_tree_view_button_release_event (GtkWidget *widget, } else if (G_UNLIKELY (event->button == 2)) { + ThunarFile *file = thunar_tree_view_get_selected_file (view); + GList *files = NULL; + g_object_get (view->preferences, "misc-middle-click-in-tab", &in_tab, NULL); /* holding ctrl inverts the action */ if ((event->state & GDK_CONTROL_MASK) != 0) in_tab = !in_tab; + files = g_list_append (files, file); + thunar_launcher_set_selection (view->launcher, files, NULL, NULL); thunar_launcher_open_selected_folders (view->launcher, in_tab); + g_list_free (files); /* set the cursor back to the previously selected item */ if (view->select_path != NULL)