lyokha/vim-fswitch — comment on commit 13bd3a9d027122b396fe2b5548ed7824de38b4c3
File:  line 0
By lyokha:

Btw i unserstood why error messages about undefined variable 'b:cursb' were
raised in some cases.

Remember that the line was

let b:cursb=&sb | set nosb | split | wincmd k | if b:cursb | set sb |
endif | unlet b:cursb

('b:' and 'winkmd k' now is removed). Then i had erroneous scenario that i
already described: we had 2 windows open and were going to split bottom
window; splitting moved cursor to the new window open in the middle, after
that erroneous 'wincmd k' moved us to the topmost window and then we said:

if b:cursb | set sb | endif | unlet b:cursb

But the buffer in the topmost window did not have this b:cursb defined
(because we moved to the topmost window by mistake and it had some another
unrelated buffer). Vim claimed about undefined variable 'b:cursb' in the
bottom line. Then we erroneously changed this buffer with the alternative
file.

2012/1/24 Derek Wyatt <
reply@reply.github.com
>

> Beauty. I'm a dead-simple window guy, so I never see this stuff... it's
> nice to get a more universal script that works for everyone. Well done,
> sir.
>
> On 24 January 2012 13:20, lyokha <
> reply@reply.github.com
> > wrote:
>
> > Thank you. I recently achieved a lot of experience working with complex
> > windows layouts and FSwitch. So the fixes are the result of found
> issues. I
> > also had enough time to test the fixes and it seems that they are ok now.
> >
> > 2012/1/24 Derek Wyatt <
> > reply@reply.github.com
> > >
> >
> > > Alright, that all seems to make good sense. Thanks Alexey.
> > >
> > > ---
> > > Reply to this email directly or view it on GitHub:
> > >
> > >
> >
> https://github.com/lyokha/vim-fswitch/commit/13bd3a9d027122b396fe2b5548ed7824de38b4c3#commitcomment-897114
> > >
> >
> > ---
> > Reply to this email directly or view it on GitHub:
> >
> >
> https://github.com/lyokha/vim-fswitch/commit/13bd3a9d027122b396fe2b5548ed7824de38b4c3#commitcomment-897198
> >
>
> ---
> Reply to this email directly or view it on GitHub:
>
> https://github.com/lyokha/vim-fswitch/commit/13bd3a9d027122b396fe2b5548ed7824de38b4c3#commitcomment-897203
>