Hi all,
According to 'switchbuf's help, it's supposed to be honored for :sb
and other buffer related split commands. The documentation is worded
a little odd in that it only mentions this for the "useopen" (and
transitively "usetab") but not "split" nor "newtab". The code, on the
other hand, does honor "split" and, with the attached patch, will also
honor "newtab" for :sb-type commands. This seems to follow the intent
of the feature.
Thanks,
--
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected]>
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
diff --git a/src/buffer.c b/src/buffer.c
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1262,7 +1262,11 @@
* page containing "buf" if one exists */
if ((swb_flags & SWB_USETAB) && buf_jump_open_tab(buf))
return OK;
- if (win_split(0, 0) == FAIL)
+ /* If 'switchbuf' contains "newtab": open new tab page instead of a new
+ * window */
+ if (swb_flags & SWB_NEWTAB)
+ tabpage_new();
+ else if (win_split(0, 0) == FAIL)
# endif
return FAIL;
}