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 0ff0bffa8744db52ec998bd0f8a39abdc3ae8dcf

Update patchset for PDCurses 3.9
* Makes Alt-. (ALT_PERIOD) actually work on Windows.
* Adds handling of Alt-, (ALT_COMMA) on Windows.
Author: xaizek
Author date (UTC): 2026-07-11 12:37
Committer name: xaizek
Committer date (UTC): 2026-07-11 12:48
Parent(s): a9dd8a14afbe56572deb85deefe03d7a114c490a
Signing key: 99DC5E4DB05F6BE2
Tree: 4bcd733c94a4160646fab3733b39dd9563520a87
File Lines added Lines deleted
ChangeLog 2 0
patches/pdcurses39/pdcurses-01-Add-ALT_PERIOD-key-and-handle-it-on-Windows.patch 18 9
patches/pdcurses39/pdcurses-02-Handle-ALT_COMMA-on-Windows.patch 25 0
patches/pdcurses39/pdcurses-03-Make-is_termresized-work-on-Windows.patch 3 3
patches/pdcurses39/pdcurses-04-Fix-displaying-of-wide-CJK-characters-for-Win32.patch 3 3
patches/pdcurses39/pdcurses-05-Windows-Terminal-supports-italic-and-underlining-via.patch 3 3
patches/pdcurses39/pdcurses-06-Remap-colors-0-15-for-Windows-Terminal.patch 3 3
patches/pdcurses39/pdcurses-07-pdc_wt-overrides-pdc_conemu-allows-starting-WT-from-.patch 3 3
patches/pdcurses39/pdcurses-08-ASCII-control-code-processing-appears-to-be-incorrec.patch 3 3
patches/pdcurses39/pdcurses-09-Suppress-cursor-during-blink-redraw.patch 3 3
patches/pdcurses39/pdcurses-10-Restart-output-using-the-non-ansi-WriteConsoleOutput.patch 3 3
patches/pdcurses39/pdcurses-11-Improve-wide-CJK-characters-handling-on-Windows.patch 4 4
File ChangeLog changed (mode: 100644) (index 17ddd924d..0916f3744)
275 275 Fixed implementation of 'title' using tsl and fsl attributes from terminfo Fixed implementation of 'title' using tsl and fsl attributes from terminfo
276 276 only for restoring the title but not for setting it. only for restoring the title but not for setting it.
277 277
278 Fixed Alt-. command-line mode key not working on Windows.
279
278 280 0.14-beta to 0.14 (2025-02-08) 0.14-beta to 0.14 (2025-02-08)
279 281
280 282 Improved documentation on zh/zl menu keys a bit. Improved documentation on zh/zl menu keys a bit.
File patches/pdcurses39/pdcurses-01-Add-ALT_PERIOD-key-and-handle-it-on-Windows.patch renamed from patches/pdcurses39/pdcurses-01-Add-support-for-Alt-.-shortcut-on-Win32.patch (similarity 56%) (mode: 100644) (index ee2eec264..04eb71cad)
1 From 020f3950372b90240c88882193a8c75887ad54ae Mon Sep 17 00:00:00 2001
1 From 6fd07b6f5c9a74769a51d0c914bdc9a2f59666fc Mon Sep 17 00:00:00 2001
2 2 From: xaizek <xaizek@posteo.net> From: xaizek <xaizek@posteo.net>
3 Date: Mon, 25 Mar 2024 00:11:58 +0200
4 Subject: [PATCH 01/10] Add support for Alt-. shortcut on Win32
3 Date: Sat, 11 Jul 2026 15:31:56 +0300
4 Subject: [PATCH 01/11] Add ALT_PERIOD key and handle it on Windows
5 5
6 6 --- ---
7 7 curses.h | 3 ++- curses.h | 3 ++-
8 wincon/pdckbd.c | 2 +-
9 2 files changed, 3 insertions(+), 2 deletions(-)
8 wincon/pdckbd.c | 7 ++++++-
9 2 files changed, 8 insertions(+), 2 deletions(-)
10 10
11 11 diff --git a/curses.h b/curses.h diff --git a/curses.h b/curses.h
12 12 index b5b91fda..f1ef17bc 100644 index b5b91fda..f1ef17bc 100644
 
... ... index b5b91fda..f1ef17bc 100644
25 25 #define KEY_F(n) (KEY_F0 + (n)) #define KEY_F(n) (KEY_F0 + (n))
26 26
27 27 diff --git a/wincon/pdckbd.c b/wincon/pdckbd.c diff --git a/wincon/pdckbd.c b/wincon/pdckbd.c
28 index 95869714..cc53d8ea 100644
28 index 95869714..fe863a9c 100644
29 29 --- a/wincon/pdckbd.c --- a/wincon/pdckbd.c
30 30 +++ b/wincon/pdckbd.c +++ b/wincon/pdckbd.c
31 @@ -197,7 +197,7 @@ static KPTAB kptab[] =
31 @@ -193,11 +193,16 @@ static KPTAB kptab[] =
32 32 {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
33 33 {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
34 34 {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
35 + /* 180 */
36 {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
37 {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
38 + {0, 0, 0, 0, 0 }, /* 188 */
39 + {0, 0, 0, 0, 0 }, /* 189 */
40 + {0, 0, 0, ALT_PERIOD, 0 }, /* 190 VK_OEM_PERIOD */
41 + {0, 0, 0, 0, 0 }, /* 191 */
42 {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
43 {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
35 44 - {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
36 + {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, ALT_PERIOD, 0}, {0, 0, 0, 0, 0},
45 + /* 200 */
37 46 {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
38 47 {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
39 48 {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
40 49 -- --
41 2.47.1
50 2.55.0
42 51
File patches/pdcurses39/pdcurses-02-Handle-ALT_COMMA-on-Windows.patch added (mode: 100644) (index 000000000..9b0f78a99)
1 From 3f2e7f382e1ec4fc9b6cd06a62901886d9a84943 Mon Sep 17 00:00:00 2001
2 From: xaizek <xaizek@posteo.net>
3 Date: Sat, 11 Jul 2026 15:32:30 +0300
4 Subject: [PATCH 02/11] Handle ALT_COMMA on Windows
5
6 ---
7 wincon/pdckbd.c | 2 +-
8 1 file changed, 1 insertion(+), 1 deletion(-)
9
10 diff --git a/wincon/pdckbd.c b/wincon/pdckbd.c
11 index fe863a9c..a8622746 100644
12 --- a/wincon/pdckbd.c
13 +++ b/wincon/pdckbd.c
14 @@ -196,7 +196,7 @@ static KPTAB kptab[] =
15 /* 180 */
16 {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
17 {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
18 - {0, 0, 0, 0, 0 }, /* 188 */
19 + {0, 0, 0, ALT_COMMA, 0 }, /* 188 VK_OEM_COMMA */
20 {0, 0, 0, 0, 0 }, /* 189 */
21 {0, 0, 0, ALT_PERIOD, 0 }, /* 190 VK_OEM_PERIOD */
22 {0, 0, 0, 0, 0 }, /* 191 */
23 --
24 2.55.0
25
File patches/pdcurses39/pdcurses-03-Make-is_termresized-work-on-Windows.patch renamed from patches/pdcurses39/pdcurses-02-Make-is_termresized-work-on-Windows.patch (similarity 81%) (mode: 100644) (index 1e5e9a93f..e1aa4fadb)
1 From 025a99adff9784dd8582f12b6fd3069454332917 Mon Sep 17 00:00:00 2001
1 From 9ddd4827e6fdb336f4f5d8098439e8542fca590d Mon Sep 17 00:00:00 2001
2 2 From: xaizek <xaizek@posteo.net> From: xaizek <xaizek@posteo.net>
3 3 Date: Mon, 25 Mar 2024 00:12:39 +0200 Date: Mon, 25 Mar 2024 00:12:39 +0200
4 Subject: [PATCH 02/10] Make is_termresized() work on Windows
4 Subject: [PATCH 03/11] Make is_termresized() work on Windows
5 5
6 6 --- ---
7 7 pdcurses/initscr.c | 4 +++- pdcurses/initscr.c | 4 +++-
 
... ... index 2fc135a1..3082ee9b 100644
23 23
24 24 const char *curses_version(void) const char *curses_version(void)
25 25 -- --
26 2.47.1
26 2.55.0
27 27
File patches/pdcurses39/pdcurses-04-Fix-displaying-of-wide-CJK-characters-for-Win32.patch renamed from patches/pdcurses39/pdcurses-03-Fix-displaying-of-wide-CJK-characters-for-Win32.patch (similarity 99%) (mode: 100644) (index d8e7c9f8b..9dfa41480)
1 From 205e39c3a5e2adc1da981fbb0f2861cd9f5139b9 Mon Sep 17 00:00:00 2001
1 From 905c5008bdab9dacbab06f4278f7be678031e29a Mon Sep 17 00:00:00 2001
2 2 From: xaizek <xaizek@posteo.net> From: xaizek <xaizek@posteo.net>
3 3 Date: Mon, 25 Mar 2024 00:13:34 +0200 Date: Mon, 25 Mar 2024 00:13:34 +0200
4 Subject: [PATCH 03/10] Fix displaying of wide (CJK) characters for Win32
4 Subject: [PATCH 04/11] Fix displaying of wide (CJK) characters for Win32
5 5
6 6 --- ---
7 7 common/libobjs.mif | 2 +- common/libobjs.mif | 2 +-
 
... ... index 00000000..9d117bf2
332 332 + +
333 333 +#endif +#endif
334 334 -- --
335 2.47.1
335 2.55.0
336 336
File patches/pdcurses39/pdcurses-05-Windows-Terminal-supports-italic-and-underlining-via.patch renamed from patches/pdcurses39/pdcurses-04-Windows-Terminal-supports-italic-and-underlining-via.patch (similarity 91%) (mode: 100644) (index e71bf3959..f1d4ad679)
1 From b8a6e979962f606ddeadd1e7a9eff0659c669bab Mon Sep 17 00:00:00 2001
1 From a04a2aa072f6b51f3e593d2b0effdcad567883b0 Mon Sep 17 00:00:00 2001
2 2 From: William McBrine <wmcbrine@gmail.com> From: William McBrine <wmcbrine@gmail.com>
3 3 Date: Mon, 5 Jul 2021 16:23:00 -0400 Date: Mon, 5 Jul 2021 16:23:00 -0400
4 Subject: [PATCH 04/10] Windows Terminal supports italic and underlining, via
4 Subject: [PATCH 05/11] Windows Terminal supports italic and underlining, via
5 5 escape codes. escape codes.
6 6
7 7 --- ---
 
... ... index dab1f76b..08d3579d 100644
47 47
48 48 extern void PDC_blink_text(void); extern void PDC_blink_text(void);
49 49 -- --
50 2.47.1
50 2.55.0
51 51
File patches/pdcurses39/pdcurses-06-Remap-colors-0-15-for-Windows-Terminal.patch renamed from patches/pdcurses39/pdcurses-05-Remap-colors-0-15-for-Windows-Terminal.patch (similarity 86%) (mode: 100644) (index 36acaa0af..97c91177c)
1 From 766dd95a079677d40040970b8c48dfb46a6f82fe Mon Sep 17 00:00:00 2001
1 From 2e63cabeb7e656bf3f9f6a0b54b2bc860eab4150 Mon Sep 17 00:00:00 2001
2 2 From: William McBrine <wmcbrine@gmail.com> From: William McBrine <wmcbrine@gmail.com>
3 3 Date: Mon, 5 Jul 2021 16:26:59 -0400 Date: Mon, 5 Jul 2021 16:26:59 -0400
4 Subject: [PATCH 05/10] Remap colors 0-15 for Windows Terminal.
4 Subject: [PATCH 06/11] Remap colors 0-15 for Windows Terminal.
5 5
6 6 --- ---
7 7 wincon/pdcscrn.c | 4 ++-- wincon/pdcscrn.c | 4 ++--
 
... ... index c6436319..0d61f821 100644
30 30 COLORREF *color_table = _get_colors(); COLORREF *color_table = _get_colors();
31 31
32 32 -- --
33 2.47.1
33 2.55.0
34 34
File patches/pdcurses39/pdcurses-07-pdc_wt-overrides-pdc_conemu-allows-starting-WT-from-.patch renamed from patches/pdcurses39/pdcurses-06-pdc_wt-overrides-pdc_conemu-allows-starting-WT-from-.patch (similarity 84%) (mode: 100644) (index e61c74a44..488f8cc07)
1 From 9a9cc97f70ee0dcb3b4b4a5afd3dd0861d2cc35c Mon Sep 17 00:00:00 2001
1 From be3be46c3f7463d1cd58f4274b6acef328dfa76d Mon Sep 17 00:00:00 2001
2 2 From: William McBrine <wmcbrine@gmail.com> From: William McBrine <wmcbrine@gmail.com>
3 3 Date: Mon, 5 Jul 2021 19:41:05 -0400 Date: Mon, 5 Jul 2021 19:41:05 -0400
4 Subject: [PATCH 06/10] pdc_wt overrides pdc_conemu -- allows starting WT from
4 Subject: [PATCH 07/11] pdc_wt overrides pdc_conemu -- allows starting WT from
5 5 ConEmu. (Note that the reverse seems unnecessary -- some of the ConEmu checks ConEmu. (Note that the reverse seems unnecessary -- some of the ConEmu checks
6 6 may be unneeded?) may be unneeded?)
7 7
 
... ... index 0d61f821..dc729748 100644
23 23 pdc_ansi = pdc_wt ? TRUE : pdc_conemu ? !strcmp(str, "ON") : FALSE; pdc_ansi = pdc_wt ? TRUE : pdc_conemu ? !strcmp(str, "ON") : FALSE;
24 24
25 25 -- --
26 2.47.1
26 2.55.0
27 27
File patches/pdcurses39/pdcurses-08-ASCII-control-code-processing-appears-to-be-incorrec.patch renamed from patches/pdcurses39/pdcurses-07-ASCII-control-code-processing-appears-to-be-incorrec.patch (similarity 87%) (mode: 100644) (index 12ce31235..299200c36)
1 From dcd83e47788645ae2ed97700fd8e2b3674d67d95 Mon Sep 17 00:00:00 2001
1 From 6eb1afc3bf6f36029ab356b1482f2791e38d7ec6 Mon Sep 17 00:00:00 2001
2 2 From: William McBrine <wmcbrine@gmail.com> From: William McBrine <wmcbrine@gmail.com>
3 3 Date: Tue, 6 Jul 2021 03:44:20 -0400 Date: Tue, 6 Jul 2021 03:44:20 -0400
4 Subject: [PATCH 07/10] ASCII control code processing appears to be
4 Subject: [PATCH 08/11] ASCII control code processing appears to be
5 5 (incorrectly) always enabled for WriteConsole() in Windows Terminal, making (incorrectly) always enabled for WriteConsole() in Windows Terminal, making
6 6 it impossible to pass some of the CP437 altcharset. The kludge is to fall it impossible to pass some of the CP437 altcharset. The kludge is to fall
7 7 back to the non-ANSI mode (no extended attributes). back to the non-ANSI mode (no extended attributes).
 
... ... index dc729748..f1f5fdd3 100644
28 28 GetConsoleScreenBufferInfo(pdc_con_out, &csbi); GetConsoleScreenBufferInfo(pdc_con_out, &csbi);
29 29 GetConsoleScreenBufferInfo(pdc_con_out, &orig_scr); GetConsoleScreenBufferInfo(pdc_con_out, &orig_scr);
30 30 -- --
31 2.47.1
31 2.55.0
32 32
File patches/pdcurses39/pdcurses-09-Suppress-cursor-during-blink-redraw.patch renamed from patches/pdcurses39/pdcurses-08-Suppress-cursor-during-blink-redraw.patch (similarity 88%) (mode: 100644) (index f4ccab0bc..a21a720b5)
1 From d901bc7298c07af6297fb1739b24c3192762d112 Mon Sep 17 00:00:00 2001
1 From f33e86e9d8a7eed56ed9e432419e9d22cf082f97 Mon Sep 17 00:00:00 2001
2 2 From: William McBrine <wmcbrine@gmail.com> From: William McBrine <wmcbrine@gmail.com>
3 3 Date: Wed, 7 Jul 2021 04:22:15 -0400 Date: Wed, 7 Jul 2021 04:22:15 -0400
4 Subject: [PATCH 08/10] Suppress cursor during blink redraw.
4 Subject: [PATCH 09/11] Suppress cursor during blink redraw.
5 5
6 6 --- ---
7 7 wincon/pdcdisp.c | 16 ++++++++++++++++ wincon/pdcdisp.c | 16 ++++++++++++++++
 
... ... index 6786e839..b89485a9 100644
42 42 pdc_last_blink = GetTickCount(); pdc_last_blink = GetTickCount();
43 43 } }
44 44 -- --
45 2.47.1
45 2.55.0
46 46
File patches/pdcurses39/pdcurses-10-Restart-output-using-the-non-ansi-WriteConsoleOutput.patch renamed from patches/pdcurses39/pdcurses-09-Restart-output-using-the-non-ansi-WriteConsoleOutput.patch (similarity 93%) (mode: 100644) (index b662b4a48..f720134f1)
1 From 895986be99522d9c5314718234134042d7fa766b Mon Sep 17 00:00:00 2001
1 From eec34ee71ecf5d0c2460ffaaf93dacb19b0249d1 Mon Sep 17 00:00:00 2001
2 2 From: William McBrine <wmcbrine@gmail.com> From: William McBrine <wmcbrine@gmail.com>
3 3 Date: Wed, 8 Dec 2021 18:04:46 -0500 Date: Wed, 8 Dec 2021 18:04:46 -0500
4 Subject: [PATCH 09/10] Restart output using the non-ansi (WriteConsoleOutput)
4 Subject: [PATCH 10/11] Restart output using the non-ansi (WriteConsoleOutput)
5 5 method when running under Windows Terminal, and printing an ACS character method when running under Windows Terminal, and printing an ACS character
6 6 below space (i.e. in the control character range). Partial reversal of below space (i.e. in the control character range). Partial reversal of
7 7 b6d6abbf -- extended attributes and redefined basic colors will be disabled b6d6abbf -- extended attributes and redefined basic colors will be disabled
 
... ... index f1f5fdd3..dc729748 100644
57 57 GetConsoleScreenBufferInfo(pdc_con_out, &csbi); GetConsoleScreenBufferInfo(pdc_con_out, &csbi);
58 58 GetConsoleScreenBufferInfo(pdc_con_out, &orig_scr); GetConsoleScreenBufferInfo(pdc_con_out, &orig_scr);
59 59 -- --
60 2.47.1
60 2.55.0
61 61
File patches/pdcurses39/pdcurses-11-Improve-wide-CJK-characters-handling-on-Windows.patch renamed from patches/pdcurses39/pdcurses-10-Improve-wide-CJK-characters-handling-on-Windows.patch (similarity 93%) (mode: 100644) (index c370a5ff7..6ffddf2b3)
1 From 1c1201af763df6023bfe52b7a60d23d1688472bd Mon Sep 17 00:00:00 2001
1 From c84f27678c1aac7a94f3bb9d3fd0384cc8d3d0c1 Mon Sep 17 00:00:00 2001
2 2 From: xaizek <xaizek@posteo.net> From: xaizek <xaizek@posteo.net>
3 3 Date: Fri, 20 Dec 2024 01:15:31 +0200 Date: Fri, 20 Dec 2024 01:15:31 +0200
4 Subject: [PATCH 10/10] Improve wide (CJK) characters handling on Windows
4 Subject: [PATCH 11/11] Improve wide (CJK) characters handling on Windows
5 5
6 6 This change addresses issues with Windows Terminal of various versions This change addresses issues with Windows Terminal of various versions
7 7 and partially ConEmu. and partially ConEmu.
 
... ... issues.
14 14 1 file changed, 19 insertions(+), 3 deletions(-) 1 file changed, 19 insertions(+), 3 deletions(-)
15 15
16 16 diff --git a/wincon/pdcdisp.c b/wincon/pdcdisp.c diff --git a/wincon/pdcdisp.c b/wincon/pdcdisp.c
17 index 14418396..e3902c1e 100644
17 index 14418396..23c4808c 100644
18 18 --- a/wincon/pdcdisp.c --- a/wincon/pdcdisp.c
19 19 +++ b/wincon/pdcdisp.c +++ b/wincon/pdcdisp.c
20 20 @@ -176,6 +176,9 @@ void _new_packet(attr_t attr, int lineno, int x, int len, const chtype *srcp) @@ -176,6 +176,9 @@ void _new_packet(attr_t attr, int lineno, int x, int len, const chtype *srcp)
 
... ... index 14418396..e3902c1e 100644
60 60 } }
61 61 else else
62 62 -- --
63 2.47.1
63 2.55.0
64 64
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