summaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-04-10 14:55:34 +0000
committerBram Moolenaar <Bram@vim.org>2006-04-10 14:55:34 +0000
commit779b74b2a23643aaac026341a4ed8bd6e04371e6 (patch)
treeff8fae99da608c087d6b56075dac7c0e73a7e1d7 /src/buffer.c
parentc6fe919573e82727a7de014daab122ffc5001854 (diff)
updated for version 7.0dv7.0d
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c
index fbad67c99c..64ed9711d0 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1212,7 +1212,11 @@ do_buffer(action, start, dir, count, forceit)
{
# ifdef FEAT_WINDOWS
/* jump to first window containing buf if one exists ("useopen") */
- if (vim_strchr(p_swb, 'u') && buf_jump_open_win(buf))
+ if (vim_strchr(p_swb, 'o') && buf_jump_open_win(buf))
+ return OK;
+ /* jump to first window in any tab page containing buf if one exists
+ * ("usetab") */
+ if (vim_strchr(p_swb, 'a') && buf_jump_open_tab(buf))
return OK;
if (win_split(0, 0) == FAIL)
# endif
@@ -1316,7 +1320,7 @@ set_curbuf(buf, action)
#endif
{
if (prevbuf == curbuf)
- u_sync();
+ u_sync(FALSE);
close_buffer(prevbuf == curwin->w_buffer ? curwin : NULL, prevbuf,
unload ? action : (action == DOBUF_GOTO
&& !P_HID(prevbuf)
@@ -1833,8 +1837,11 @@ buflist_getfile(n, lnum, options, forceit)
if (options & GETF_SWITCH)
{
/* use existing open window for buffer if wanted */
- if (vim_strchr(p_swb, 'u')) /* useopen */
+ if (vim_strchr(p_swb, 'o')) /* useopen */
wp = buf_jump_open_win(buf);
+ /* use existing open window in any tab page for buffer if wanted */
+ if (vim_strchr(p_swb, 'a')) /* usetab */
+ wp = buf_jump_open_tab(buf);
/* split window if wanted ("split") */
if (wp == NULL && vim_strchr(p_swb, 't') && !bufempty())
{