Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions autoload/tig_explorer.vim
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ endfunction
" Open a file for the given commit
" Usefull when editing file from tree or blame view
function! tig_explorer#open_file_with_commit(diff, mods, commit, file, lineno)
let commit = get(a:, 'commit', 'HEAD')
let file = get(a:, 'file', '')
let lineno = get(a:, 'lineno', 0)
let commit = a:commit ?? 'HEAD'
let file = a:file
let lineno = a:lineno ?? 0

let file0 = ''
" if no file is provided use the current one
Expand Down
3 changes: 2 additions & 1 deletion plugin/tig_explorer.vim
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ command! TigStatus
\ call tig_explorer#status()

command! -bang -nargs=* TigOpenFileWithCommit
\ call tig_explorer#open_file_with_commit("<bang>",<q-mods>,<f-args>)
\ call call('tig_explorer#open_file_with_commit',
\ slice(["<bang>",<q-mods>,<f-args>]+['','',''],0,5))
Comment on lines +39 to +40
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not working on Vim 8.1 and NVIM v0.4.3

Image from Gyazo

These errors are meaning,

Unknown function: slice
Invalid argument: call


let &cpoptions = s:save_cpo
unlet s:save_cpo
Expand Down