Skip to content

Commit de5850c

Browse files
committed
edit the last selected file
instead of the first
1 parent 4c0f7f7 commit de5850c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

autoload/nnn.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ function! s:eval_temp_file(opts)
8686
" Consider trimming out current working directory from filename
8787
let l:cwd = getcwd()
8888
call map(l:names, { _, val -> strcharpart(val, 0, strlen(l:cwd)) ==# l:cwd ? strcharpart(val, strlen(l:cwd) + 1) : val }) " + 1 is to also remove the trailing slash
89+
call reverse(l:names)
8990
" Edit the first item.
9091
execute 'silent' l:Cmd fnameescape(l:names[0])
9192
" Add any remaining items to the arg list/buffer list.

0 commit comments

Comments
 (0)