# HG changeset patch # User Ludovic Chabant # Date 1455689666 28800 # Node ID d5602a22bab5579bed246a194c573f42775d47a8 # Parent 860e6502b239f05df4ed2cc00ce4b3a78a2abd22 Correctly escape the command on Windows when `&shellslash` is enabled. diff -r 860e6502b239 -r d5602a22bab5 plugin/lawrencium.vim --- a/plugin/lawrencium.vim Tue Feb 16 21:53:42 2016 -0800 +++ b/plugin/lawrencium.vim Tue Feb 16 22:14:26 2016 -0800 @@ -356,6 +356,8 @@ if a:0 == 1 && type(a:1) == type([]) let l:arg_list = a:1 endif + let l:prev_shellslash = &shellslash + setlocal noshellslash let l:hg_command = g:lawrencium_hg_executable . ' --repository ' . shellescape(s:stripslash(self.root_dir)) let l:hg_command = l:hg_command . ' ' . a:command for l:arg in l:arg_list @@ -365,6 +367,9 @@ let l:hg_command = l:hg_command . ' ' . l:arg endif endfor + if l:prev_shellslash + setlocal shellslash + endif return l:hg_command endfunction