summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2020-02-26 12:56:39 +0100
committerOndrej Holy <oholy@redhat.com>2020-03-06 14:58:16 +0000
commit4d7a1a7413cc7e76e99e11def90a6503cc142efb (patch)
tree4c80129cdb5c5c0250c7ca12eee9d84b752c283f
parent13ecf5f9c2d219866550757cb660b569299ac285 (diff)
downloadnautilus-4d7a1a7413cc7e76e99e11def90a6503cc142efb.tar.gz
files-view: Clear selection if any files don't match the pattern
The Select items matching (Ctrl + S) feature allows to select files which match the pattern. However, it is confusing that current selection is not cleared when any files don't match the pattern.
-rw-r--r--src/nautilus-files-view.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 5573701cc..f3d507fff 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -1716,12 +1716,12 @@ pattern_select_response_cb (GtkWidget *dialog,
selection = nautilus_directory_match_pattern (directory,
gtk_entry_get_text (GTK_ENTRY (entry)));
+ nautilus_files_view_call_set_selection (view, selection);
+ nautilus_files_view_reveal_selection (view);
+
if (selection)
{
- nautilus_files_view_call_set_selection (view, selection);
nautilus_file_list_free (selection);
-
- nautilus_files_view_reveal_selection (view);
}
/* fall through */
}