picker & fifomode: pick a file on 'l' or `Right` press

This commit is contained in:
Oxore 2024-03-06 23:24:25 +03:00
parent 5456ba4582
commit 3956d034d3
1 changed files with 9 additions and 3 deletions

View File

@ -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;