commit f6b401fd856a17212ebc4065cc0c96a478ae124d
parent f34bdfc551710ed5f4936d6d7e5ef97074ad35b1
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date: Mon, 13 Apr 2026 18:49:37 +0530
Fix CI
Diffstat:
4 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/patches/colemak/mainline.diff b/patches/colemak/mainline.diff
@@ -2,7 +2,7 @@ diff --git a/src/nnn.c b/src/nnn.c
index d7c53166..bb7ff3e8 100644
--- a/src/nnn.c
+++ b/src/nnn.c
-@@ -5149,12 +5149,12 @@ static void show_help(const char *path)
+@@ -6262,12 +6262,12 @@ static void show_help(const char *path)
"2(___n))\n"
"0\n"
"1NAVIGATION\n"
@@ -20,23 +20,24 @@ index d7c53166..bb7ff3e8 100644
"8B (,) Book(mark)%11b ^/ Select bookmark\n"
"a1-4 Context%11(Sh)Tab Cycle/new context\n"
"62Esc ^Q Quit%19^y Next young\n"
-@@ -5162,27 +5162,27 @@ static void show_help(const char *path)
- "cq Quit context\n"
+@@ -6279,28 +6279,28 @@ static void show_help(const char *path)
+ "4q Alt+Esc Quit context%11^L Refresh dir\n"
"0\n"
"1FILTER & PROMPT\n"
- "c/ Filter%17^N Toggle type-to-nav\n"
+ "c/ Filter%17^K Toggle type-to-nav\n"
"aEsc Exit prompt%12^L Toggle last filter\n"
- "c. Toggle hidden%05Alt+Esc Unfilter, quit context\n"
+ "c. Toggle hidden\n"
"0\n"
"1FILES\n"
- "9o ^O Open with%15n Create new/link\n"
+ "9o ^O Open with%15c Create new/link\n"
"9f ^F File stats%14d Detail mode toggle\n"
- "b^R Rename/dup%14r Batch rename\n"
-- "cz Archive%17e Edit file\n"
-+ "cz Archive%17y Edit file\n"
- "c* Toggle exe%14> Export list\n"
+ "b^R Rename/dup%14P Preview toggle\n"
+- "cr Batch rename%12e Edit file\n"
++ "cr Batch rename%12y Edit file\n"
+ "cz Archive%17* Toggle exe\n"
+ "c> Export list\n"
"6Space + (Un)select%12m-m Select range/clear\n"
"ca Select all%14A Invert sel\n"
"9p ^P Copy here%12w ^W Cp/mv sel as\n"
diff --git a/patches/namefirst/mainline.diff b/patches/namefirst/mainline.diff
@@ -4,7 +4,6 @@
# Author: Luuk van Baal
diff --git a/src/nnn.c b/src/nnn.c
-index ff05436e..bdfd4d0a 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -432,6 +432,10 @@ typedef struct {
@@ -260,10 +259,7 @@ index ff05436e..bdfd4d0a 100644
}
/**
-@@ -8047,26 +8079,19 @@ static void statusbar(char *path)
- tocursor();
- }
-
+@@ -8063,10 +8063,2 @@ static void statusbar(char *path)
-static inline void markhovered(void)
-{
- if (cfg.showdetail && ndents) { /* Bold forward arrowhead */
@@ -272,9 +268,9 @@ index ff05436e..bdfd4d0a 100644
- }
-}
-
- static int adjust_cols(int n)
- {
- /* Calculate the number of cols available to print entry name */
+ #define PREVIEW_BORDER_COL (xcols / 2)
+ #define PREVIEW_COL (PREVIEW_BORDER_COL + 2)
+@@ -8340,12 +8331,13 @@ static void preview_pane(const char *path)
#ifdef ICONS_ENABLED
n -= (g_state.oldcolor ? 0 : ICON_SIZE + ICON_PADDING_LEFT_LEN + ICON_PADDING_RIGHT_LEN);
#endif
@@ -290,7 +286,7 @@ index ff05436e..bdfd4d0a 100644
}
/* 2 columns for preceding space and indicator */
-@@ -8105,8 +8130,6 @@ static void draw_line(int ncols)
+@@ -8385,8 +8378,6 @@ static void draw_line(int ncols)
/* Must reset e.g. no files in dir */
if (dir)
attroff(COLOR_PAIR(cfg.curctx + 1) | A_BOLD);
@@ -299,7 +295,7 @@ index ff05436e..bdfd4d0a 100644
}
static void redraw(char *path)
-@@ -8214,6 +8237,26 @@ static void redraw(char *path)
+@@ -8500,6 +8491,26 @@ static void redraw(char *path)
int onscreen = MIN(ONSCREEN + curscroll, ndents);
int len = scanselforpath(path, FALSE);
@@ -326,12 +322,14 @@ index ff05436e..bdfd4d0a 100644
ncols = adjust_cols(ncols);
/* Print listing */
-@@ -8242,7 +8285,7 @@ static void redraw(char *path)
- #endif
+@@ -8531,9 +8542,9 @@ static void redraw(char *path)
}
- markhovered();
+ statusbar(path);
+
+ if (cfg.preview)
+ preview_pane(path);
}
static bool cdprep(char *lastdir, char *lastname, char *path, char *newpath)
diff --git a/plugins/.npreview b/plugins/.npreview
@@ -20,7 +20,7 @@ hd() { head -n "$H"; }
show_dir() {
has tree && { tree -L 1 -n --dirsfirst --noreport "$F" | hd; return; }
- ls -1 "$F" 2>/dev/null | hd
+ find "$F" -maxdepth 1 -print 2>/dev/null | hd
}
show_text() {
diff --git a/src/nnn.c b/src/nnn.c
@@ -8394,7 +8394,7 @@ static void redraw(char *path)
int ncols = (xcols <= PATH_MAX) ? xcols : PATH_MAX;
/* Limit listing width when preview pane is active */
- if (cfg.preview && xcols >= (MIN_PREVIEW_COLS * 2 + 1)) {
+ if (cfg.preview && xcols >= ((MIN_PREVIEW_COLS * 2) + 1)) {
int listcols = PREVIEW_BORDER_COL;
if (ncols > listcols)
ncols = listcols;