Mercurial > hg
changeset 21629:664c49420d48
vim: use try catch in vim plugin to avoid conflicts
author | Ali Vakilzade <ali.vakilzade@gmail.com> |
---|---|
date | Sat, 03 May 2014 19:11:51 +0430 |
parents | 7c5a85619dca |
children | a204fd9b5ba9 |
files | contrib/vim/hgcommand.vim |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/vim/hgcommand.vim Wed May 28 15:37:47 2014 -0700 +++ b/contrib/vim/hgcommand.vim Sat May 03 19:11:51 2014 +0430 @@ -105,7 +105,7 @@ let fileName=<SID>HGResolveLink(a:fileName) let newCwd=fnamemodify(fileName, ':h') if strlen(newCwd) > 0 - execute 'cd' escape(newCwd, ' ') + try | execute 'cd' escape(newCwd, ' ') | catch | | endtry endif return oldCwd endfunction @@ -396,7 +396,7 @@ return returnExpression finally - execute 'cd' escape(oldCwd, ' ') + try | execute 'cd' escape(oldCwd, ' ') | catch | | endtry endtry endfunction