mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 01:06:08 +03:00
apprt/gtk: do not deinit tab in closeTab
This commit is contained in:
@ -205,10 +205,8 @@ pub fn closeTab(self: *Window, tab: *Tab) void {
|
|||||||
// Find page and tab which we're closing
|
// Find page and tab which we're closing
|
||||||
const page_idx = getNotebookPageIndex(page);
|
const page_idx = getNotebookPageIndex(page);
|
||||||
|
|
||||||
// Deallocate the tab
|
// Remove the page. This will destroy the GTK widgets in the page which
|
||||||
tab.deinit(self.app.core_app.alloc);
|
// will trigger Tab cleanup.
|
||||||
self.app.core_app.alloc.destroy(tab);
|
|
||||||
|
|
||||||
c.gtk_notebook_remove_page(self.notebook, page_idx);
|
c.gtk_notebook_remove_page(self.notebook, page_idx);
|
||||||
|
|
||||||
const remaining = c.gtk_notebook_get_n_pages(self.notebook);
|
const remaining = c.gtk_notebook_get_n_pages(self.notebook);
|
||||||
|
Reference in New Issue
Block a user