Commit 18d64ac02c8fb0715d2fd0638852d51b3e31a56e
Use reset_search_results() in opt_handlers.c
sorting_changed() was doing `view->matches = 0` without updating
`search_match` flag of entries and could conceivably skip a redraw.
With this change in place, an early exit if `view->matches` is zero at
the top of reset_search_results() should always make sense now. There
are a few cases in filelist.c, but those should not misalign `matches`
and flags of entries.
Author: xaizek
Author date (UTC): 2026-04-08 12:38
Committer name: xaizek
Committer date (UTC): 2026-04-11 13:28
Parent(s): 07f9be278ad0d0cc7a31cb01b9460a899b9761d3
Signing key: 99DC5E4DB05F6BE2
Tree: 2bca2797799a564fc23d691b58dff8cc5fb1f1e8
| File src/opt_handlers.c changed (mode: 100644) (index 4b666cad7..890bf545c) |
| ... |
... |
set_sortgroups(view_t *view, char **opt, char value[]) |
| 3388 |
3388 |
static void |
static void |
| 3389 |
3389 |
sorting_changed(view_t *view, int defer_slow) |
sorting_changed(view_t *view, int defer_slow) |
| 3390 |
3390 |
{ |
{ |
| 3391 |
|
/* Reset search results, which might be outdated after resorting. */ |
|
| 3392 |
|
view->matches = 0; |
|
|
3391 |
|
/* Search results may be outdated after resorting. */ |
|
3392 |
|
reset_search_results(view); |
| 3393 |
3393 |
fview_sorting_updated(view); |
fview_sorting_updated(view); |
| 3394 |
3394 |
if(!defer_slow) |
if(!defer_slow) |
| 3395 |
3395 |
{ |
{ |