Skip to content

Commit 2161dc7

Browse files
committed
Use xolox#misc#os#exec()
1 parent d488dd2 commit 2161dc7

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

autoload/xolox/luainspect.vim

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
" Vim script.
22
" Author: Peter Odding <peter@peterodding.com>
3-
" Last Change: November 21, 2011
3+
" Last Change: November 24, 2011
44
" URL: http://peterodding.com/code/vim/lua-inspect/
55

6-
let g:xolox#luainspect#version = '0.4.15'
6+
let g:xolox#luainspect#version = '0.4.16'
77

88
function! xolox#luainspect#toggle_cmd() " {{{1
99
if !(exists('b:luainspect_disabled') && b:luainspect_disabled)
@@ -144,14 +144,10 @@ function! s:parse_text(input, search_path) " {{{1
144144
let template = 'lua -e "%s; require ''luainspect4vim'' (io.read ''*a'')"'
145145
let command = printf(template, a:search_path)
146146
try
147-
let b:luainspect_output = xolox#shell#execute(command, 1, a:input)
148-
catch /^Vim\%((\a\+)\)\=:E117/
149-
" Ignore missing shell.vim plug-in.
150-
let b:luainspect_output = split(system(command, a:input), "\n")
151-
if v:shell_error
152-
let msg = "luainspect.vim %s: Failed to execute LuaInspect as external process! %s"
153-
throw printf(msg, g:xolox#luainspect#version, strtrans(join(b:luainspect_output, "\n")))
154-
endif
147+
let b:luainspect_output = xolox#misc#os#exec(command, a:input)
148+
catch
149+
let msg = "luainspect.vim %s: Failed to execute LuaInspect as external process! %s"
150+
throw printf(msg, g:xolox#luainspect#version, strtrans(join(b:luainspect_output, "\n")))
155151
endtry
156152
else
157153
redir => output

0 commit comments

Comments
 (0)