From 9f5c2d1dc2a8338152ed9c01a436462488a0d833 Mon Sep 17 00:00:00 2001 From: Michal Vitecek Date: Wed, 2 Oct 2002 00:00:00 +0000 Subject: [PATCH] Version 0.71 - fixed problem with undefined window-bound variable w:PHStatusLine when a window has been split into two. - unbound event BufWinEnter because it's not needed because of the above change now --- plugin/pythonhelper.vim | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/plugin/pythonhelper.vim b/plugin/pythonhelper.vim index aa19725..301499d 100644 --- a/plugin/pythonhelper.vim +++ b/plugin/pythonhelper.vim @@ -336,10 +336,18 @@ function! PHBufferDelete() endfunction +function! TagInStatusLine() + if (exists("w:PHStatusLine")) + return w:PHStatusLine + else + return "" + endif +endfunction + + " autocommands binding autocmd CursorHold * silent call PHCursorHold() -autocmd BufWinEnter * silent call PHCursorHold() autocmd BufDelete * silent call PHBufferDelete() " time that determines after how long time of no activity the CursorHold event @@ -352,7 +360,5 @@ highlight User1 gui=bold guifg=cyan guibg=black highlight User2 gui=bold guifg=black guibg=red " the status line will be displayed for every window set laststatus=2 -" set the status variable for the current window -let w:PHStatusLine = '' " set the status line to display some useful information -set stl=%-f%r\ %2*%m%*\ \ \ \ %1*%{w:PHStatusLine}%*%=[%l:%c]\ \ \ \ [buf\ %n] +set stl=%-f%r\ %2*%m%*\ \ \ \ %1*%{TagInStatusLine()}%*%=[%l:%c]\ \ \ \ [buf\ %n]