Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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...
commit fd3920c5fd7faba9881a2b89525b5caa7753baa8 1 parent 59ba90c
Peter Odding authored
Showing with 4 additions and 2 deletions.
  1. +3 −1 autoload.vim
  2. +1 −1  luainspect.vim
4 autoload.vim
View
@@ -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
@@ -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')
2  luainspect.vim
View
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.