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

Bert Wesarg bert.wesarg at googlemail.com
Tue Oct 27 11:11:19 CET 2009


On Tue, Oct 27, 2009 at 10:10, TK Soh <teekaysoh at gmail.com> 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


More information about the Discuss mailing list