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.
<root> / patches / pdcurses34 / pdcurses-4-fix-reverse.patch (8d2d6c0af974d1f47f8c446af5b0bf7e2e68123c) (1,055B) (mode 100644) [raw]
This patch has been taken from:
https://sourceforge.net/p/pdcurses/discussion/95730/thread/395ac4ed/

diff --git a/win32/pdcscrn.c b/win32/pdcscrn.c
index da84cde..4d9ce51 100644
--- a/win32/pdcscrn.c
+++ b/win32/pdcscrn.c
@@ -555,9 +555,11 @@ void PDC_init_pair(short pair, short fg, short bg)
 
     for (i = 0; i < PDC_OFFSET; i++)
     {
+        const int reverse = (i & (A_REVERSE >> PDC_ATTR_SHIFT));
+
         att = fg | (bg << 4);
 
-        if (i & (A_REVERSE >> PDC_ATTR_SHIFT))
+        if (reverse)
             att = bg | (fg << 4);
         if (i & (A_UNDERLINE >> PDC_ATTR_SHIFT))
             /* No underscores in Windows terminals. */
@@ -568,9 +570,9 @@ void PDC_init_pair(short pair, short fg, short bg)
             att = temp_bg << 4 | temp_bg;
         }
         if (i & (A_BOLD >> PDC_ATTR_SHIFT))
-            att |= 8;
+            att |= reverse ? 128 : 8;
         if (i & (A_BLINK >> PDC_ATTR_SHIFT))
-            att |= 128;
+            att |= reverse ? 8 : 128;
 
         pdc_atrtab[pair * PDC_OFFSET + i] = att;
     }
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