On 03/14/2015 03:38 PM, Bram Moolenaar wrote:
>
> Patch 7.4.663
> Problem:    When using netbeans a buffer is not found in another tab.
> Solution:   When 'switchbuf' is set to "usetab" then switch to another tab
>        when possible. (Xavier de Gaye)
> Files:         src/netbeans.c
>
>
> *** ../vim-7.4.662/src/netbeans.c  2015-02-10 18:33:53.240319951 +0100
> --- src/netbeans.c 2015-03-14 15:33:06.806660549 +0100
> ***************
> *** 2691,2698 ****
>        static void
>    nb_set_curbuf(buf_T *buf)
>    {
> !     if (curbuf != buf && buf_jump_open_win(buf) == NULL)
>            set_curbuf(buf, DOBUF_GOTO);
>    }
>
>    /*
> --- 2691,2705 ----
>        static void
>    nb_set_curbuf(buf_T *buf)
>    {
> !     if (curbuf != buf) {
> !  if (buf_jump_open_win(buf) != NULL)
> !      return;
> ! # ifdef FEAT_WINDOWS
> !  if ((swb_flags & SWB_USETAB) && buf_jump_open_tab(buf) != NULL)
> !      return;
> ! # endif
>            set_curbuf(buf, DOBUF_GOTO);
> +     }
>    }
>
>    /*
> *** ../vim-7.4.662/src/version.c   2015-03-13 15:02:46.258059206 +0100
> --- src/version.c  2015-03-14 15:29:00.889427900 +0100
> ***************
> *** 743,744 ****
> --- 743,746 ----
>    {   /* Add new patch number below this line */
> + /**/
> +     663,
>    /**/
>


buf_jump_open_tab() calls buf_jump_open_win() so this patch causes
buf_jump_open_win() to be called twice when this function returns NULL and
SWB_USETAB is set.

In buffer.c, the only other module where buf_jump_open_tab() is called, both
calls to buf_jump_open_win() and buf_jump_open_tab() are made if FEAT_WINDOWS.
I am not sure if netbeans would be usable without FEAT_WINDOWS or FEAT_SIGNS
but for consistency sake, should not that be done also in netbeans.c  ?


-- Xavier

--
--
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

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to