# HG changeset patch # User Ludovic Chabant # Date 1324426295 28800 # Node ID 09115be355e2343e9e36431388b55e36cab76085 # Parent de588a4bca10f37358c7b0eeccaf5abbbe0ce0f6 Fixed a bug with running `Hgedit` on a directory with a trailing backslash. diff -r de588a4bca10 -r 09115be355e2 plugin/lawrencium.vim --- a/plugin/lawrencium.vim Tue Dec 20 16:01:35 2011 -0800 +++ b/plugin/lawrencium.vim Tue Dec 20 16:11:35 2011 -0800 @@ -455,7 +455,16 @@ " Hgedit {{{ -call s:AddMainCommand("-bang -nargs=? -complete=customlist,s:ListRepoFiles Hgedit :edit `=s:hg_repo().GetFullPath()`") +function! s:HgEdit(bang, filename) abort + let l:full_path = s:hg_repo().GetFullPath(a:filename) + if a:bang + execute "edit! " . l:full_path + else + execute "edit " . l:full_path + endif +endfunction + +call s:AddMainCommand("-bang -nargs=? -complete=customlist,s:ListRepoFiles Hgedit :call s:HgEdit(0, )") " }}}