xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit c05c2873ebd8c7b41166decc2a3358e7a9737a79

Fix `:sync! all` not synchronizing local filter
Of a tree with `set cvoptions=localfilter`.

Thanks to filterfalse.
Author: xaizek
Author date (UTC): 2020-09-16 15:34
Committer name: xaizek
Committer date (UTC): 2020-09-16 15:34
Parent(s): eb4cb0a8c0a5fdc8edbd2e072f9934df532216d7
Signing key: 99DC5E4DB05F6BE2
Tree: 75bceef555fab2f80c24b4d40aced3f85aea33b6
File Lines added Lines deleted
ChangeLog 3 0
src/cmd_handlers.c 4 4
tests/commands/sync.c 25 0
File ChangeLog changed (mode: 100644) (index 07d457cb1..6c6cbb002)
8 8 Fixed an issue with undesired cache invalidation for symbolic link to Fixed an issue with undesired cache invalidation for symbolic link to
9 9 directories, which caused performance issue (regression in 0.11-beta). directories, which caused performance issue (regression in 0.11-beta).
10 10
11 Fixed `:sync! all` not synchronizing local filter of a tree with
12 `set cvoptions=localfilter`. Thanks to filterfalse.
13
11 14 0.10.1 to 0.11-beta (2020-09-10) 0.10.1 to 0.11-beta (2020-09-10)
12 15
13 16 Added :VifmCs command to the plugin for "converting" Vim's color scheme Added :VifmCs command to the plugin for "converting" Vim's color scheme
File src/cmd_handlers.c changed (mode: 100644) (index de7402b8c..e8beeb3d8)
... ... sync_selectively(const cmd_info_t *cmd_info)
4173 4173 tree = 0; tree = 0;
4174 4174 } }
4175 4175
4176 if(filters)
4177 {
4178 sync_filters();
4179 }
4180 4176 if(local_options) if(local_options)
4181 4177 { {
4182 4178 sync_local_opts(location); sync_local_opts(location);
 
... ... sync_selectively(const cmd_info_t *cmd_info)
4187 4183 sync_location(flist_get_dir(curr_view), filelist, cursor_pos, filters, sync_location(flist_get_dir(curr_view), filelist, cursor_pos, filters,
4188 4184 tree); tree);
4189 4185 } }
4186 if(filters)
4187 {
4188 sync_filters();
4189 }
4190 4190
4191 4191 return 0; return 0;
4192 4192 } }
File tests/commands/sync.c changed (mode: 100644) (index b7f6302cf..b424178d1)
... ... TEST(sync_syncs_custom_trees)
354 354 columns_teardown(); columns_teardown();
355 355 } }
356 356
357 TEST(sync_all_applies_filters_in_trees)
358 {
359 opt_handlers_setup();
360 columns_setup_column(SK_BY_NAME);
361 columns_setup_column(SK_BY_SIZE);
362 columns_set_line_print_func(&column_line_print);
363 other_view->columns = columns_create();
364
365 make_abs_path(curr_view->curr_dir, sizeof(curr_view->curr_dir),
366 TEST_DATA_PATH, "", NULL);
367
368 assert_success(exec_commands("set cvoptions=localfilter", curr_view,
369 CIT_COMMAND));
370 assert_success(exec_commands("tree", curr_view, CIT_COMMAND));
371 local_filter_apply(curr_view, "a");
372 assert_success(exec_commands("sync! all", curr_view, CIT_COMMAND));
373
374 assert_string_equal("a", other_view->local_filter.filter.raw);
375
376 columns_free(other_view->columns);
377 other_view->columns = NULL;
378 columns_teardown();
379 opt_handlers_teardown();
380 }
381
357 382 /* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ /* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */
358 383 /* vim: set cinoptions+=t0 filetype=c : */ /* vim: set cinoptions+=t0 filetype=c : */
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master