case SEL_HELP: // fallthrough
case SEL_AUTONEXT: // fallthrough
case SEL_EDIT: // fallthrough
+ case SEL_VIEW: // fallthrough
case SEL_LOCK:
{
bool refresh = FALSE;
if (ndents)
mkpath(path, pdents[cur].name, newpath);
- else if (sel == SEL_EDIT) /* Avoid trying to edit a non-existing file */
+ else if ((sel == SEL_EDIT) || (sel == SEL_VIEW)) /* Avoid trying to edit a non-existing file */
goto nochange;
switch (sel) {
if (!(g_state.picker || g_state.fifomode))
spawn(editor, newpath, NULL, NULL, F_CLI);
continue;
+ case SEL_VIEW:
+ if (!(g_state.picker || g_state.fifomode))
+ spawn(pager, newpath, NULL, NULL, F_CLI);
+ continue;
default: /* SEL_LOCK */
lock_terminal();
break;