Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 August 16, 2010
4  autoload.vim
... ...
@@ -1,6 +1,6 @@
1 1
 " Vim script.
2 2
 " Author: Peter Odding <peter@peterodding.com>
3  
-" Last Change: August 15, 2010
  3
+" Last Change: August 16, 2010
4 4
 " URL: http://peterodding.com/code/vim/lua-inspect/
5 5
 " License: MIT
6 6
 
@@ -132,6 +132,8 @@ function! s:parse_text(input, search_path) " {{{1
132 132
           throw printf(msg, strtrans(join(b:luainspect_output, "\n")))
133 133
         endif
134 134
       endtry
  135
+      let message_filter = '^\(status\|warning\):'
  136
+      call filter(b:luainspect_output, 'v:val !~ message_filter')
135 137
     else
136 138
       redir => output
137 139
       silent lua require 'luainspect4vim' (vim.eval 'a:input')
2  luainspect.vim
@@ -2,7 +2,7 @@
2 2
 " Author: Peter Odding <peter@peterodding.com>
3 3
 " Last Change: August 16, 2010
4 4
 " URL: http://peterodding.com/code/vim/lua-inspect/
5  
-" Version: 0.4.1
  5
+" Version: 0.4.2
6 6
 " License: MIT
7 7
 
8 8
 " Support for automatic update using the GLVS plug-in.

0 notes on commit fd3920c

Please sign in to comment.
Something went wrong with that request. Please try again.