ervandew/screen — Issue #15: taglist window always opened on :ScreenShell
Author: aetherknight
Created: 2012-02-09 00:32:16+00:00
State: open

If I have taglist.vim installed, the :ScreenShell command always opens a taglist window, even if one was not open before running :ScreenShell. I believe the problem is caused by line 181 in autoload/screen.vim (in version 1.5). The line is part of an if statement that checks to see whether a taglist window is open or not in s:ScreenBootstrap(). currently, its check is:

if exists(':TlistSessionSave') &&
\ exists('g:TagList_title') &&
\ bufwinnr(g:TagList_title)

with the problem being the bufwinnr(g:TagList_title). bufwinnr() returns -1 if the specified window name does not exist, which evaluates to true by vim (0 evaluates to false). To fix, check the return value for -1:

\ bufwinnr(g:TagList_title) != -1