mirror of https://github.com/jarun/nnn.git
picker & fifomode: pick a file on 'l' or `Right` press
This commit is contained in:
parent
5456ba4582
commit
3956d034d3
12
src/nnn.c
12
src/nnn.c
|
@ -7139,13 +7139,19 @@ nochange:
|
|||
}
|
||||
|
||||
#ifndef NOFIFO
|
||||
if (g_state.fifomode && (sel == SEL_OPEN)) {
|
||||
if (g_state.fifomode) {
|
||||
/* Open file disabled on right arrow or `l` */
|
||||
if (cfg.nonavopen && sel == SEL_NAV_IN)
|
||||
goto nochange;
|
||||
send_to_explorer(&presel); /* Write selection to explorer fifo */
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
/* If opened as vim plugin and Enter/^M pressed, pick */
|
||||
if (g_state.picker && (sel == SEL_OPEN)) {
|
||||
/* If opened as vim plugin and Enter/^M/Double-click or l/Right pressed, pick */
|
||||
if (g_state.picker) {
|
||||
/* Open file disabled on right arrow or `l` */
|
||||
if (cfg.nonavopen && sel == SEL_NAV_IN)
|
||||
goto nochange;
|
||||
if (nselected == 0) /* Pick if none selected */
|
||||
appendfpath(newpath, mkpath(path, pent->name, newpath));
|
||||
return EXIT_SUCCESS;
|
||||
|
|
Loading…
Reference in New Issue