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 4f582e9e7888730f4a84b2f367b720b72b16ae37

Fix 'wildinc' "eating" slashes
A single slash after a slash ends regular completion, but automatic one
shouldn't be affected by it.
Author: xaizek
Author date (UTC): 2024-10-20 13:21
Committer name: xaizek
Committer date (UTC): 2024-10-20 13:52
Parent(s): 8260fcdd3e1dcdf949c33330aed9472fb5685e25
Signing key: 99DC5E4DB05F6BE2
Tree: 4ce1233c8be9eae0cabe142a1b067de222b85e1b
File Lines added Lines deleted
src/modes/cmdline.c 1 1
tests/misc/cmdline.c 10 0
File src/modes/cmdline.c changed (mode: 100644) (index bc89c414d..91e02d704)
... ... def_handler(wchar_t key)
344 344
345 345 input_stat.hist_search = HIST_NONE; input_stat.hist_search = HIST_NONE;
346 346
347 if(input_stat.complete_continue
347 if(input_stat.complete_continue && !input_stat.inc_completion
348 348 && input_stat.line[input_stat.index - 1] == L'/' && key == L'/') && input_stat.line[input_stat.index - 1] == L'/' && key == L'/')
349 349 { {
350 350 stop_completion(); stop_completion();
File tests/misc/cmdline.c changed (mode: 100644) (index 3448dcae6..930696132)
... ... TEST(wild_inc_completion)
658 658 cfg.wild_inc = matcher_alloc_glob(":plugin", &error); cfg.wild_inc = matcher_alloc_glob(":plugin", &error);
659 659 assert_string_equal(NULL, error); assert_string_equal(NULL, error);
660 660
661 /* A :command that's auto-completed. */
661 662 (void)vle_keys_exec_timed_out(L":plugin"); (void)vle_keys_exec_timed_out(L":plugin");
662 663 assert_false(stats->inc_completion); assert_false(stats->inc_completion);
663 664 (void)vle_keys_exec_timed_out(L" "); (void)vle_keys_exec_timed_out(L" ");
664 665 assert_true(stats->inc_completion); assert_true(stats->inc_completion);
666
667 /* Verify that slash isn't treated specially as it is for user-initiated
668 * completion. */
669 (void)vle_keys_exec_timed_out(L"/");
670 assert_wstring_equal(L"plugin /", stats->line);
671 (void)vle_keys_exec_timed_out(L"/");
672 assert_wstring_equal(L"plugin //", stats->line);
673
665 674 (void)vle_keys_exec_timed_out(WK_C_c); (void)vle_keys_exec_timed_out(WK_C_c);
666 675
676 /* A :command that's not auto-completed. */
667 677 (void)vle_keys_exec_timed_out(L":set"); (void)vle_keys_exec_timed_out(L":set");
668 678 assert_false(stats->inc_completion); assert_false(stats->inc_completion);
669 679 (void)vle_keys_exec_timed_out(L" "); (void)vle_keys_exec_timed_out(L" ");
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