mirror of
https://github.com/jarun/nnn.git
synced 2025-01-28 19:56:48 +00:00
Update patches
This commit is contained in:
parent
7def65fc02
commit
ddbd15f7fd
|
@ -6,10 +6,10 @@
|
||||||
# Authors: Luuk van Baal
|
# Authors: Luuk van Baal
|
||||||
|
|
||||||
diff --git a/src/nnn.c b/src/nnn.c
|
diff --git a/src/nnn.c b/src/nnn.c
|
||||||
index 83ecdb90..4397944a 100644
|
index 936e9c02..22032dcd 100644
|
||||||
--- a/src/nnn.c
|
--- a/src/nnn.c
|
||||||
+++ b/src/nnn.c
|
+++ b/src/nnn.c
|
||||||
@@ -270,6 +270,25 @@
|
@@ -286,6 +286,25 @@
|
||||||
#define VFS_USED 1
|
#define VFS_USED 1
|
||||||
#define VFS_SIZE 2
|
#define VFS_SIZE 2
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ index 83ecdb90..4397944a 100644
|
||||||
/* TYPE DEFINITIONS */
|
/* TYPE DEFINITIONS */
|
||||||
typedef unsigned int uint_t;
|
typedef unsigned int uint_t;
|
||||||
typedef unsigned char uchar_t;
|
typedef unsigned char uchar_t;
|
||||||
@@ -294,6 +313,7 @@ typedef struct entry {
|
@@ -310,6 +329,7 @@ typedef struct entry {
|
||||||
uid_t uid; /* 4 bytes */
|
uid_t uid; /* 4 bytes */
|
||||||
gid_t gid; /* 4 bytes */
|
gid_t gid; /* 4 bytes */
|
||||||
#endif
|
#endif
|
||||||
|
@ -43,7 +43,7 @@ index 83ecdb90..4397944a 100644
|
||||||
} *pEntry;
|
} *pEntry;
|
||||||
|
|
||||||
/* Selection marker */
|
/* Selection marker */
|
||||||
@@ -349,6 +369,7 @@ typedef struct {
|
@@ -365,6 +385,7 @@ typedef struct {
|
||||||
uint_t cliopener : 1; /* All-CLI app opener */
|
uint_t cliopener : 1; /* All-CLI app opener */
|
||||||
uint_t waitedit : 1; /* For ops that can't be detached, used EDITOR */
|
uint_t waitedit : 1; /* For ops that can't be detached, used EDITOR */
|
||||||
uint_t rollover : 1; /* Roll over at edges */
|
uint_t rollover : 1; /* Roll over at edges */
|
||||||
|
@ -51,7 +51,7 @@ index 83ecdb90..4397944a 100644
|
||||||
} settings;
|
} settings;
|
||||||
|
|
||||||
/* Non-persistent program-internal states (alphabeical order) */
|
/* Non-persistent program-internal states (alphabeical order) */
|
||||||
@@ -400,7 +421,17 @@ typedef struct {
|
@@ -418,7 +439,17 @@ typedef struct {
|
||||||
} session_header_t;
|
} session_header_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ index 83ecdb90..4397944a 100644
|
||||||
|
|
||||||
/* Configuration, contexts */
|
/* Configuration, contexts */
|
||||||
static settings cfg = {
|
static settings cfg = {
|
||||||
@@ -3796,6 +3827,47 @@ static int get_kv_key(kv *kvarr, char *val, uchar_t max, uchar_t id)
|
@@ -3950,6 +3981,47 @@ static int get_kv_key(kv *kvarr, char *val, uchar_t max, uchar_t id)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ index 83ecdb90..4397944a 100644
|
||||||
static void resetdircolor(int flags)
|
static void resetdircolor(int flags)
|
||||||
{
|
{
|
||||||
/* Directories are always shown on top, clear the color when moving to first file */
|
/* Directories are always shown on top, clear the color when moving to first file */
|
||||||
@@ -4123,6 +4195,10 @@ static void printent(const struct entry *ent, uint_t namecols, bool sel)
|
@@ -4283,6 +4355,10 @@ static void printent(int pdents_index, uint_t namecols, bool sel)
|
||||||
|
|
||||||
uchar_t color_pair = get_color_pair_name_ind(ent, &ind, &attrs);
|
uchar_t color_pair = get_color_pair_name_ind(ent, &ind, &attrs);
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ index 83ecdb90..4397944a 100644
|
||||||
addch((ent->flags & FILE_SELECTED) ? '+' | A_REVERSE | A_BOLD : ' ');
|
addch((ent->flags & FILE_SELECTED) ? '+' | A_REVERSE | A_BOLD : ' ');
|
||||||
|
|
||||||
if (g_state.oldcolor)
|
if (g_state.oldcolor)
|
||||||
@@ -5592,6 +5668,11 @@ static int dentfill(char *path, struct entry **ppdents)
|
@@ -5788,6 +5864,11 @@ static int dentfill(char *path, struct entry **ppdents)
|
||||||
attron(COLOR_PAIR(cfg.curctx + 1));
|
attron(COLOR_PAIR(cfg.curctx + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ index 83ecdb90..4397944a 100644
|
||||||
#if _POSIX_C_SOURCE >= 200112L
|
#if _POSIX_C_SOURCE >= 200112L
|
||||||
posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL);
|
posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL);
|
||||||
#endif
|
#endif
|
||||||
@@ -5792,6 +5873,29 @@ static int dentfill(char *path, struct entry **ppdents)
|
@@ -5988,6 +6069,29 @@ static int dentfill(char *path, struct entry **ppdents)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ index 83ecdb90..4397944a 100644
|
||||||
++ndents;
|
++ndents;
|
||||||
} while ((dp = readdir(dirp)));
|
} while ((dp = readdir(dirp)));
|
||||||
|
|
||||||
@@ -6361,11 +6465,12 @@ static int adjust_cols(int n)
|
@@ -6569,11 +6673,12 @@ static int adjust_cols(int n)
|
||||||
#endif
|
#endif
|
||||||
if (cfg.showdetail) {
|
if (cfg.showdetail) {
|
||||||
/* Fallback to light mode if less than 35 columns */
|
/* Fallback to light mode if less than 35 columns */
|
||||||
|
@ -186,7 +186,7 @@ index 83ecdb90..4397944a 100644
|
||||||
|
|
||||||
/* 2 columns for preceding space and indicator */
|
/* 2 columns for preceding space and indicator */
|
||||||
return (n - 2);
|
return (n - 2);
|
||||||
@@ -8143,6 +8248,7 @@ static void usage(void)
|
@@ -8401,6 +8506,7 @@ static void usage(void)
|
||||||
" -F val fifo mode [0:preview 1:explore]\n"
|
" -F val fifo mode [0:preview 1:explore]\n"
|
||||||
#endif
|
#endif
|
||||||
" -g regex filters\n"
|
" -g regex filters\n"
|
||||||
|
@ -194,7 +194,7 @@ index 83ecdb90..4397944a 100644
|
||||||
" -H show hidden files\n"
|
" -H show hidden files\n"
|
||||||
" -i show current file info\n"
|
" -i show current file info\n"
|
||||||
" -J no auto-advance on selection\n"
|
" -J no auto-advance on selection\n"
|
||||||
@@ -8282,6 +8388,7 @@ static void cleanup(void)
|
@@ -8544,6 +8650,7 @@ static void cleanup(void)
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -202,16 +202,16 @@ index 83ecdb90..4397944a 100644
|
||||||
free(selpath);
|
free(selpath);
|
||||||
free(plgpath);
|
free(plgpath);
|
||||||
free(cfgpath);
|
free(cfgpath);
|
||||||
@@ -8326,7 +8433,7 @@ int main(int argc, char *argv[])
|
@@ -8589,7 +8696,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
while ((opt = (env_opts_id > 0
|
while ((opt = (env_opts_id > 0
|
||||||
? env_opts[--env_opts_id]
|
? env_opts[--env_opts_id]
|
||||||
- : getopt(argc, argv, "aAb:BcCdDeEfF:gHiJKl:nNop:P:QrRs:St:T:uUVxh"))) != -1) {
|
- : getopt(argc, argv, "aAb:BcCdDeEfF:gHiJKl:nNop:P:QrRs:St:T:uUVx0h"))) != -1) {
|
||||||
+ : getopt(argc, argv, "aAb:BcCdDeEfF:gGHiJKl:nNop:P:QrRs:St:T:uUVxh"))) != -1) {
|
+ : getopt(argc, argv, "aAb:BcCdDeEfF:gGHiJKl:nNop:P:QrRs:St:T:uUVx0h"))) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
#ifndef NOFIFO
|
#ifndef NOFIFO
|
||||||
case 'a':
|
case 'a':
|
||||||
@@ -8380,6 +8487,9 @@ int main(int argc, char *argv[])
|
@@ -8643,6 +8750,9 @@ int main(int argc, char *argv[])
|
||||||
cfg.regex = 1;
|
cfg.regex = 1;
|
||||||
filterfn = &visible_re;
|
filterfn = &visible_re;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -209,8 +209,8 @@ index 88538787..d4af7c43 100644
|
||||||
|
|
||||||
while ((opt = (env_opts_id > 0
|
while ((opt = (env_opts_id > 0
|
||||||
? env_opts[--env_opts_id]
|
? env_opts[--env_opts_id]
|
||||||
- : getopt(argc, argv, "aAb:BcCdDeEfF:gHiJKl:nNop:P:QrRs:St:T:uUVxh"))) != -1) {
|
- : getopt(argc, argv, "aAb:BcCdDeEfF:gHiJKl:nNop:P:QrRs:St:T:uUVx0h"))) != -1) {
|
||||||
+ : getopt(argc, argv, "aAb:BcCdDeEfF:gGHiJKl:nNop:P:QrRs:St:T:uUVxh"))) != -1) {
|
+ : getopt(argc, argv, "aAb:BcCdDeEfF:gGHiJKl:nNop:P:QrRs:St:T:uUVx0h"))) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
#ifndef NOFIFO
|
#ifndef NOFIFO
|
||||||
case 'a':
|
case 'a':
|
||||||
|
|
Loading…
Reference in a new issue