mirror of
https://github.com/jarun/nnn.git
synced 2025-01-22 16:56:46 +00:00
Picker mode: don't pick on Enter if selection exists
This commit is contained in:
parent
12fa5344cf
commit
24b71bcf1f
|
@ -6828,7 +6828,7 @@ nochange:
|
||||||
#endif
|
#endif
|
||||||
/* If opened as vim plugin and Enter/^M pressed, pick */
|
/* If opened as vim plugin and Enter/^M pressed, pick */
|
||||||
if (g_state.picker && (sel == SEL_OPEN)) {
|
if (g_state.picker && (sel == SEL_OPEN)) {
|
||||||
if (!(pdents[cur].flags & FILE_SELECTED))
|
if (nselected == 0) /* Pick if none selected */
|
||||||
appendfpath(newpath, mkpath(path, pent->name, newpath));
|
appendfpath(newpath, mkpath(path, pent->name, newpath));
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -7263,7 +7263,7 @@ nochange:
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
/* move cursor to the next entry if this is not the last entry */
|
/* move cursor to the next entry if this is not the last entry */
|
||||||
if (!g_state.stayonsel && !g_state.picker && cur != ndents - 1)
|
if (!g_state.stayonsel && (cur != ndents - 1))
|
||||||
move_cursor((cur + 1) % ndents, 0);
|
move_cursor((cur + 1) % ndents, 0);
|
||||||
break;
|
break;
|
||||||
case SEL_SELMUL:
|
case SEL_SELMUL:
|
||||||
|
|
Loading…
Reference in a new issue