xolox/vim-session — pull request #51 by inkarkat (2013-05-31 11:42:24+00:00)
Title: BUG: Wrong "global session" label when saving tab session for the first ...

...time.

The problem is that `xolox#session#get_label()` determines the tab-scope through `xolox#session#is_tab_scoped()`, which checks the existence of `t:this_session`. But before the save of a tab-scoped session, this variable hasn't been set yet, and therefore it yields the wrong label "global session"!

All places that invoke `xolox#session#get_label()` in fact already determine the scope themselves, so let's scrap the logic and just pass in the boolean flag as an additional `is_tab_scoped` argument. This eliminates any risk that the message contradicts what's actually happening, and it's simpler, too.