From 57e962865f070f16b5cde7e83257bb128606802b Mon Sep 17 00:00:00 2001 From: Charles Lehner Date: Thu, 25 Oct 2012 17:20:07 -0400 Subject: [PATCH] Prevent tabs in error messages from causing "press enter" prompt. Convert the tabs to spaces so that they are counted towards the window width and the status message does not wrap. --- plugin/syntastic.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 4cd087e9..0227823d 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -439,7 +439,8 @@ function! s:WideMsg(msg) let old_ruler = &ruler let old_showcmd = &showcmd - let msg = strpart(a:msg, 0, winwidth(0)-1) + let msg = substitute(a:msg, "\t", repeat(" ", &tabstop), "g") + let msg = strpart(msg, 0, winwidth(0)-1) "This is here because it is possible for some error messages to begin with "\n which will cause a "press enter" prompt. I have noticed this in the