Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ignore LuaInspect status messages on stderr
LuaInspect recently started emitting `status:' and `warning:' messages
to `stderr' which causes problems when running `luainspect4vim.lua' as
an external process because the Vim plug-in sees those messages as
output from `luainspect4vim.lua' and tries to parse them.

Ideally the Vim plug-in should just ignore all output on `stderr' but
that requires changing the API presented by my `shell.vim' plug-in and
this means I also have to update every other plug-in that integrates
with `shell.vim'... For this reason `luainspect.vim' now explicitly
ignores lines starting with `status:' or `warning:'.
  • Loading branch information
xolox committed Aug 16, 2010
1 parent 59ba90c commit fd3920c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion autoload.vim
@@ -1,6 +1,6 @@
" Vim script.
" Author: Peter Odding <peter@peterodding.com>
" Last Change: August 15, 2010
" Last Change: August 16, 2010
" URL: http://peterodding.com/code/vim/lua-inspect/
" License: MIT

Expand Down Expand Up @@ -132,6 +132,8 @@ function! s:parse_text(input, search_path) " {{{1
throw printf(msg, strtrans(join(b:luainspect_output, "\n")))
endif
endtry
let message_filter = '^\(status\|warning\):'
call filter(b:luainspect_output, 'v:val !~ message_filter')
else
redir => output
silent lua require 'luainspect4vim' (vim.eval 'a:input')
Expand Down
2 changes: 1 addition & 1 deletion luainspect.vim
Expand Up @@ -2,7 +2,7 @@
" Author: Peter Odding <peter@peterodding.com>
" Last Change: August 16, 2010
" URL: http://peterodding.com/code/vim/lua-inspect/
" Version: 0.4.1
" Version: 0.4.2
" License: MIT

" Support for automatic update using the GLVS plug-in.
Expand Down

0 comments on commit fd3920c

Please sign in to comment.