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 eb846df80ce59e4061c4a0ef7b9576a7cb2b82d2

Fix completing long column names for :highlight
"column:" + '\0' takes up 8 out of 16 bytes allocated for the buffer,
leaving only 8 available.

Use a buffer of 128 bytes, which should be more than enough for any use
case.
Author: xaizek
Author date (UTC): 2026-03-29 14:14
Committer name: xaizek
Committer date (UTC): 2026-03-29 14:14
Parent(s): f0ca87c41341bab77394e3bb0d3e8a43903b6f0e
Signing key: 99DC5E4DB05F6BE2
Tree: f6bf37af040ae716441b53345ba0407a0e12a9e5
File Lines added Lines deleted
ChangeLog 2 0
src/cmd_completion.c 1 1
tests/commands/completion.c 4 0
File ChangeLog changed (mode: 100644) (index 1c81fd21b..1557fd67a)
228 228 Fixed :yank and :delete not handling optional count parameter correctly (a Fixed :yank and :delete not handling optional count parameter correctly (a
229 229 regression since v0.11-beta). Thanks to CaptainFantastic. regression since v0.11-beta). Thanks to CaptainFantastic.
230 230
231 Fixed completion of :highlight truncating long custom column names.
232
231 233 0.14-beta to 0.14 (2025-02-08) 0.14-beta to 0.14 (2025-02-08)
232 234
233 235 Improved documentation on zh/zl menu keys a bit. Improved documentation on zh/zl menu keys a bit.
File src/cmd_completion.c changed (mode: 100644) (index f0d1aa7ed..cbaf1ad4c)
... ... complete_highlight_groups(const char str[], int for_clear)
854 854 char *lua_name = vlua_viewcolumn_map_back(curr_stats.vlua, i); char *lua_name = vlua_viewcolumn_map_back(curr_stats.vlua, i);
855 855 if(lua_name != NULL) if(lua_name != NULL)
856 856 { {
857 char name[16];
857 char name[128];
858 858 snprintf(name, sizeof(name), "column:%s", lua_name); snprintf(name, sizeof(name), "column:%s", lua_name);
859 859 if(strncmp(str, name, len) == 0) if(strncmp(str, name, len) == 0)
860 860 { {
File tests/commands/completion.c changed (mode: 100644) (index 6e2b7809f..9eeefd0e8)
... ... TEST(highlight_columns_are_completed)
616 616 GLUA_EQ(curr_stats.vlua, "", "function handler() end"); GLUA_EQ(curr_stats.vlua, "", "function handler() end");
617 617 GLUA_EQ(curr_stats.vlua, "", GLUA_EQ(curr_stats.vlua, "",
618 618 "vifm.addcolumntype{ name = 'Test', handler = handler }"); "vifm.addcolumntype{ name = 'Test', handler = handler }");
619 GLUA_EQ(curr_stats.vlua, "",
620 "vifm.addcolumntype{ name = 'WhatAReallyLongAndAwkwardColumnName',"
621 "handler = handler }");
619 622
620 623 /* Completion doesn't require columns to be colored. */ /* Completion doesn't require columns to be colored. */
621 624 ASSERT_COMPLETION(L"hi column:s", L"hi column:size"); ASSERT_COMPLETION(L"hi column:s", L"hi column:size");
622 625 ASSERT_COMPLETION(L"hi column:T", L"hi column:Test"); ASSERT_COMPLETION(L"hi column:T", L"hi column:Test");
626 ASSERT_COMPLETION(L"hi column:W", L"hi column:WhatAReallyLongAndAwkwardColumnName");
623 627
624 628 assert_success(cmds_dispatch("hi column:size cterm=bold", &lwin, CIT_COMMAND)); assert_success(cmds_dispatch("hi column:size cterm=bold", &lwin, CIT_COMMAND));
625 629 ASSERT_COMPLETION(L"hi clear column:si", L"hi clear column:size"); ASSERT_COMPLETION(L"hi clear column:si", L"hi clear column:size");
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