Disable shellslash while shellescaping

This commit is contained in:
Karl Yngve Lervåg 2014-07-29 09:10:22 +02:00
parent 30b551bc58
commit 16c4c0e25c
2 changed files with 21 additions and 0 deletions

View File

@ -106,9 +106,16 @@ function! latex#view(...) " {{{1
" Join arguments to pass them on to the viewer " Join arguments to pass them on to the viewer
let args = join(a:000, ' ') let args = join(a:000, ' ')
" Disable shellslash
let l:ssl = &l:ssl
setlocal nossl
let exe = {} let exe = {}
let exe.cmd = g:latex_viewer . ' ' . args . shellescape(outfile) let exe.cmd = g:latex_viewer . ' ' . args . shellescape(outfile)
" Restore shellslash
let &l:ssl = l:ssl
call latex#util#execute(exe) call latex#util#execute(exe)
endfunction endfunction
" }}}1 " }}}1

View File

@ -72,6 +72,10 @@ function! latex#latexmk#clean(full) " {{{1
return return
endif endif
" Disable shellslash
let l:ssl = &l:ssl
setlocal nossl
" "
" Run latexmk clean process " Run latexmk clean process
" "
@ -93,6 +97,9 @@ function! latex#latexmk#clean(full) " {{{1
\ } \ }
call latex#util#execute(exe) call latex#util#execute(exe)
" Restore shellslash
let &l:ssl = l:ssl
if a:full if a:full
echomsg "latexmk full clean finished" echomsg "latexmk full clean finished"
else else
@ -225,6 +232,10 @@ function! s:latexmk_set_cmd(data) " {{{1
" which allows inspection of latexmk output " which allows inspection of latexmk output
let tmp = tempname() let tmp = tempname()
" Disable shellslash
let l:ssl = &l:ssl
setlocal nossl
if has('win32') if has('win32')
let cmd = 'cd /D ' . shellescape(a:data.root) let cmd = 'cd /D ' . shellescape(a:data.root)
let cmd .= ' && set max_print_line=2000 & latexmk' let cmd .= ' && set max_print_line=2000 & latexmk'
@ -249,6 +260,9 @@ function! s:latexmk_set_cmd(data) " {{{1
let cmd .= ' ' . shellescape(a:data.base) let cmd .= ' ' . shellescape(a:data.base)
" Restore shellslash
let &l:ssl = l:ssl
if has('win32') if has('win32')
let cmd .= ' >' . tmp let cmd .= ' >' . tmp
let cmd = 'cmd /s /c "' . cmd . '"' let cmd = 'cmd /s /c "' . cmd . '"'