mirror of
https://github.com/jarun/nnn.git
synced 2024-11-17 16:39:14 +00:00
Remove redundant prompt
This commit is contained in:
parent
e94ac0b91b
commit
baca4693ec
5
Makefile
5
Makefile
|
@ -26,7 +26,6 @@ O_BENCH := 0 # benchmark mode (stops at first user input)
|
||||||
O_NOSSN := 0 # enable session support
|
O_NOSSN := 0 # enable session support
|
||||||
O_NOUG := 0 # disable user, group name in status bar
|
O_NOUG := 0 # disable user, group name in status bar
|
||||||
O_NOX11 := 0 # disable X11 integration
|
O_NOX11 := 0 # disable X11 integration
|
||||||
O_LARGESEL := 0 # set threshold for large selection
|
|
||||||
|
|
||||||
# User patches
|
# User patches
|
||||||
O_GITSTATUS := 0 # add git status to detail view
|
O_GITSTATUS := 0 # add git status to detail view
|
||||||
|
@ -116,10 +115,6 @@ ifeq ($(strip $(O_NOX11)),1)
|
||||||
CPPFLAGS += -DNOX11
|
CPPFLAGS += -DNOX11
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(strip $(O_LARGESEL)),0)
|
|
||||||
CPPFLAGS += -DLARGESEL=$(strip $(O_LARGESEL))
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
|
ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
|
||||||
CFLAGS_CURSES ?= $(shell $(PKG_CONFIG) --cflags ncursesw)
|
CFLAGS_CURSES ?= $(shell $(PKG_CONFIG) --cflags ncursesw)
|
||||||
LDLIBS_CURSES ?= $(shell $(PKG_CONFIG) --libs ncursesw)
|
LDLIBS_CURSES ?= $(shell $(PKG_CONFIG) --libs ncursesw)
|
||||||
|
|
|
@ -24,7 +24,6 @@ O_BENCH := 0 # benchmark mode (stops at first user input)
|
||||||
O_NOSSN := 0 # enable session support
|
O_NOSSN := 0 # enable session support
|
||||||
O_NOUG := 0 # disable user, group name in status bar
|
O_NOUG := 0 # disable user, group name in status bar
|
||||||
O_NOX11 := 0 # disable X11 integration
|
O_NOX11 := 0 # disable X11 integration
|
||||||
O_LARGESEL := 0 # set threshold for large selection
|
|
||||||
|
|
||||||
# User patches
|
# User patches
|
||||||
O_GITSTATUS := 0 # add git status to detail view
|
O_GITSTATUS := 0 # add git status to detail view
|
||||||
|
@ -119,10 +118,6 @@ ifeq ($(strip $(O_NOX11)),1)
|
||||||
CPPFLAGS += -DNOX11
|
CPPFLAGS += -DNOX11
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(strip $(O_LARGESEL)),0)
|
|
||||||
CPPFLAGS += -DLARGESEL=$(strip $(O_LARGESEL))
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
|
ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
|
||||||
CFLAGS_CURSES ?= $(shell $(PKG_CONFIG) --cflags ncursesw)
|
CFLAGS_CURSES ?= $(shell $(PKG_CONFIG) --cflags ncursesw)
|
||||||
LDLIBS_CURSES ?= $(shell $(PKG_CONFIG) --libs ncursesw)
|
LDLIBS_CURSES ?= $(shell $(PKG_CONFIG) --libs ncursesw)
|
||||||
|
|
10
src/nnn.c
10
src/nnn.c
|
@ -611,9 +611,8 @@ static char * const utils[] = {
|
||||||
#define MSG_RM_TMP 39
|
#define MSG_RM_TMP 39
|
||||||
#define MSG_INVALID_KEY 40
|
#define MSG_INVALID_KEY 40
|
||||||
#define MSG_NOCHANGE 41
|
#define MSG_NOCHANGE 41
|
||||||
#define MSG_LARGESEL 42
|
|
||||||
#ifndef DIR_LIMITED_SELECTION
|
#ifndef DIR_LIMITED_SELECTION
|
||||||
#define MSG_DIR_CHANGED 43 /* Must be the last entry */
|
#define MSG_DIR_CHANGED 42 /* Must be the last entry */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char * const messages[] = {
|
static const char * const messages[] = {
|
||||||
|
@ -659,7 +658,6 @@ static const char * const messages[] = {
|
||||||
"remove tmp file?",
|
"remove tmp file?",
|
||||||
"invalid key",
|
"invalid key",
|
||||||
"unchanged",
|
"unchanged",
|
||||||
"inversion may be slow, continue?",
|
|
||||||
#ifndef DIR_LIMITED_SELECTION
|
#ifndef DIR_LIMITED_SELECTION
|
||||||
"dir changed, range sel off", /* Must be the last entry */
|
"dir changed, range sel off", /* Must be the last entry */
|
||||||
#endif
|
#endif
|
||||||
|
@ -1571,17 +1569,15 @@ static int markcmp(const void *va, const void *vb)
|
||||||
|
|
||||||
static void invertselbuf(char *path)
|
static void invertselbuf(char *path)
|
||||||
{
|
{
|
||||||
/* This may be slow for large selection, ask for confirmation */
|
|
||||||
if (nselected > LARGESEL && !xconfirm(get_input(messages[MSG_LARGESEL])))
|
|
||||||
return;
|
|
||||||
|
|
||||||
size_t len, endpos, offset = 0;
|
size_t len, endpos, offset = 0;
|
||||||
char *found;
|
char *found;
|
||||||
int nmarked = 0, prev = 0;
|
int nmarked = 0, prev = 0;
|
||||||
selmark *marked = malloc(nselected * sizeof(selmark));
|
selmark *marked = malloc(nselected * sizeof(selmark));
|
||||||
|
|
||||||
|
if (nselected > LARGESEL) {
|
||||||
printmsg("processing...");
|
printmsg("processing...");
|
||||||
refresh();
|
refresh();
|
||||||
|
}
|
||||||
|
|
||||||
/* First pass: inversion */
|
/* First pass: inversion */
|
||||||
for (int i = 0; i < ndents; ++i) {
|
for (int i = 0; i < ndents; ++i) {
|
||||||
|
|
Loading…
Reference in a new issue