Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use xolox#misc#os#exec()

  • Loading branch information...
commit 2161dc7b6e726b5d9ec624eb682bf2d4623a54cc 1 parent d488dd2
@xolox authored
Showing with 6 additions and 10 deletions.
  1. +6 −10 autoload/xolox/luainspect.vim
View
16 autoload/xolox/luainspect.vim
@@ -1,9 +1,9 @@
" Vim script.
" Author: Peter Odding <peter@peterodding.com>
-" Last Change: November 21, 2011
+" Last Change: November 24, 2011
" URL: http://peterodding.com/code/vim/lua-inspect/
-let g:xolox#luainspect#version = '0.4.15'
+let g:xolox#luainspect#version = '0.4.16'
function! xolox#luainspect#toggle_cmd() " {{{1
if !(exists('b:luainspect_disabled') && b:luainspect_disabled)
@@ -144,14 +144,10 @@ function! s:parse_text(input, search_path) " {{{1
let template = 'lua -e "%s; require ''luainspect4vim'' (io.read ''*a'')"'
let command = printf(template, a:search_path)
try
- let b:luainspect_output = xolox#shell#execute(command, 1, a:input)
- catch /^Vim\%((\a\+)\)\=:E117/
- " Ignore missing shell.vim plug-in.
- let b:luainspect_output = split(system(command, a:input), "\n")
- if v:shell_error
- let msg = "luainspect.vim %s: Failed to execute LuaInspect as external process! %s"
- throw printf(msg, g:xolox#luainspect#version, strtrans(join(b:luainspect_output, "\n")))
- endif
+ let b:luainspect_output = xolox#misc#os#exec(command, a:input)
+ catch
+ let msg = "luainspect.vim %s: Failed to execute LuaInspect as external process! %s"
+ throw printf(msg, g:xolox#luainspect#version, strtrans(join(b:luainspect_output, "\n")))
endtry
else
redir => output
Please sign in to comment.
Something went wrong with that request. Please try again.