Remove shellslash options, fix windows find (#40)

This commit is contained in:
Karl Yngve Lervåg 2014-08-02 13:49:09 +02:00
parent e00fb95767
commit bef84296d8
2 changed files with 2 additions and 22 deletions

View File

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

View File

@ -72,10 +72,6 @@ function! latex#latexmk#clean(full) " {{{1
return
endif
" Disable shellslash
let l:ssl = &l:ssl
setlocal nossl
"
" Run latexmk clean process
"
@ -97,9 +93,6 @@ function! latex#latexmk#clean(full) " {{{1
\ }
call latex#util#execute(exe)
" Restore shellslash
let &l:ssl = l:ssl
if a:full
echomsg "latexmk full clean finished"
else
@ -232,10 +225,6 @@ function! s:latexmk_set_cmd(data) " {{{1
" which allows inspection of latexmk output
let tmp = tempname()
" Disable shellslash
let l:ssl = &l:ssl
setlocal nossl
if has('win32')
let cmd = 'cd /D ' . shellescape(a:data.root)
let cmd .= ' && set max_print_line=2000 & latexmk'
@ -259,9 +248,6 @@ function! s:latexmk_set_cmd(data) " {{{1
let cmd .= ' ' . shellescape(a:data.base)
" Restore shellslash
let &l:ssl = l:ssl
if has('win32')
let cmd .= ' >' . tmp
let cmd = 'cmd /s /c "' . cmd . '"'
@ -279,7 +265,8 @@ function! s:latexmk_set_pid(data) " {{{1
let tmpfile = tempname()
silent execute '!cmd /c "wmic process where '
\ . '(CommandLine LIKE "latexmk\%' . a:data.base . '\%") '
\ . 'get ProcessId /value | find "ProcessId" '
\ . 'get ProcessId /value'
\ . '| \%WINDIR\%\system32\find "ProcessId" '
\ . '>' . tmpfile . ' "'
let pids = readfile(tmpfile)
let a:data.pid = strpart(pids[0], 10)