Re: [PATCH] Add new "Open new Tab"-Tab to the tab bar

Bert Wesarg <bert.wesarg-gM/[email protected]>
Newsgroups gmane.editors.nedit.user
Message-ID <[email protected]>
On Tue, Oct 27, 2009 at 10:10, TK Soh <[email protected]> wrote:
> Thanks.
>
> BTW, I ran into a coredump when opening new tab. To recreate, disable
> 'Hide Tab Bar...', then click on the '+' tab. Here's my quick fix on
> top of my earlier one:
>
> diff --git a/source/window.c b/source/window.c
> --- a/source/window.c
> +++ b/source/window.c
> @@ -4715,9 +4715,7 @@
>         tab = tabList[cbs->pos];
>         RaiseDocument(TabToWindow(tab));
>     } else {
> -        WindowInfo *window = lastFocusDocument;
> -        if (!window)
> -            window = TabToWindow(tabList[cbs->pos - 2]);
> +        WindowInfo *window = GetTopDocument(w);
>         EditNewFile(window, NULL, False, NULL, window->path);
>         CheckCloseDim();
>         cbs->allowActivate = 0;
>
> The patch also open the new tab using the path of the top/active
> document, which I feel it's more consistent with original nedit
> behavior on opening new tab.
Ahh, this was what I indented. But got it wrong. Thanks.

Bert
-- 
NEdit Discuss mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.