Skip to content

Commit

Permalink
fix: Maintain selected row even after search changed
Browse files Browse the repository at this point in the history
  • Loading branch information
liferooter committed Oct 24, 2022
1 parent 01be4a0 commit c915fac
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Window.vala
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,13 @@ namespace TextPieces {
search_sorter.changed (DIFFERENT);
search_filter.changed (DIFFERENT);

/* Select the first row if no row is selected */
if (search_listbox.get_selected_row () == null) {
search_listbox.select_row (
search_listbox.get_row_at_index (0)
);
}

/* Show placeholder if
there are no tools found */
search_stack.set_visible_child_name (
Expand Down

0 comments on commit c915fac

Please sign in to comment.