comparison plugin/lawrencium.vim @ 27:09115be355e2

Fixed a bug with running `Hgedit` on a directory with a trailing backslash.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 20 Dec 2011 16:11:35 -0800
parents de588a4bca10
children 0cdfdab43907
comparison
equal deleted inserted replaced
26:de588a4bca10 27:09115be355e2
453 453
454 " }}} 454 " }}}
455 455
456 " Hgedit {{{ 456 " Hgedit {{{
457 457
458 call s:AddMainCommand("-bang -nargs=? -complete=customlist,s:ListRepoFiles Hgedit :edit<bang> `=s:hg_repo().GetFullPath(<q-args>)`") 458 function! s:HgEdit(bang, filename) abort
459 let l:full_path = s:hg_repo().GetFullPath(a:filename)
460 if a:bang
461 execute "edit! " . l:full_path
462 else
463 execute "edit " . l:full_path
464 endif
465 endfunction
466
467 call s:AddMainCommand("-bang -nargs=? -complete=customlist,s:ListRepoFiles Hgedit :call s:HgEdit(<bang>0, <f-args>)")
459 468
460 " }}} 469 " }}}
461 470
462 " Hgdiff {{{ 471 " Hgdiff {{{
463 472