This is an automated email from the git hooks/post-receive script.

git pushed a commit to reference refs/pull/34/head
in repository terminology.

View the commit online.

commit 47e97a874bd82aaca79d276e0435217bedb5b695
Author: [email protected] <[email protected]>
AuthorDate: Mon Mar 30 09:28:26 2026 -0600

    refactor: use _term_new_solo at remaining call sites
    
    Apply the _term_new_solo() helper to the three remaining places that
    duplicated the term_new + _solo_new + sizedone pattern: window split,
    pane split, and new tab creation.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
---
 src/bin/win.c | 24 ++++++------------------
 1 file changed, 6 insertions(+), 18 deletions(-)

diff --git a/src/bin/win.c b/src/bin/win.c
index 75f9fb11..358c9878 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -229,6 +229,7 @@ static Tab_Drag *_tab_drag = NULL;
 
 static Eina_Bool _win_is_focused(Win *wn);
 static Term_Container *_solo_new(Term *term, Win *wn);
+static Term_Container *_term_new_solo(Win *wn, const char *cmd, const char *wdir);
 static Term_Container *_split_new(Term_Container *tc1, Term_Container *tc2,
                                   double left_size, Eina_Bool is_horizontal);
 static Term_Container *_tabs_new(Term_Container *child, Term_Container *parent);
@@ -1537,7 +1538,7 @@ _win_split(Term_Container *tc, Term_Container *child,
 
    if (_term_container_is_splittable(tc, is_horizontal))
      {
-        Term *tm_new, *tm;
+        Term *tm;
         Term_Container *tc_split, *tc_solo_new;
         char *wdir = NULL;
         char buf[PATH_MAX];
@@ -1553,11 +1554,7 @@ _win_split(Term_Container *tc, Term_Container *child,
              if (tm && termio_cwd_get(tm->termio, buf, sizeof(buf)))
                wdir = buf;
           }
-        tm_new = term_new(wn, wn->config,
-                          cmd, wn->config->login_shell, wdir,
-                          80, 24, EINA_FALSE, NULL);
-        tc_solo_new = _solo_new(tm_new, wn);
-        evas_object_data_set(tm_new->termio, "sizedone", tm_new->termio);
+        tc_solo_new = _term_new_solo(wn, cmd, wdir);
 
         elm_layout_content_unset(wn->base, "terminology.content");
 
@@ -2898,7 +2895,7 @@ _split_split(Term_Container *tc, Term_Container *child,
 {
    Split *split;
    Win *wn;
-   Term *tm_new, *tm;
+   Term *tm;
    char *wdir = NULL;
    char buf[PATH_MAX];
    Term_Container *tc_split, *tc_solo_new;
@@ -2923,11 +2920,7 @@ _split_split(Term_Container *tc, Term_Container *child,
         if (tm && termio_cwd_get(tm->termio, buf, sizeof(buf)))
           wdir = buf;
      }
-   tm_new = term_new(wn, wn->config,
-                     cmd, wn->config->login_shell, wdir,
-                     80, 24, EINA_FALSE, NULL);
-   tc_solo_new = _solo_new(tm_new, wn);
-   evas_object_data_set(tm_new->termio, "sizedone", tm_new->termio);
+   tc_solo_new = _term_new_solo(wn, cmd, wdir);
 
    if (child == split->tc1)
      elm_object_part_content_unset(split->panes, PANES_TOP);
@@ -5041,7 +5034,6 @@ _tab_new_cb(void *data,
    Tabs *tabs = data;
    Term_Container *tc = (Term_Container*) tabs,
                   *tc_new;
-   Term *tm_new;
    Win *wn = tc->wn;
    char *wdir = NULL;
    char buf[PATH_MAX];
@@ -5058,11 +5050,7 @@ _tab_new_cb(void *data,
           wdir = buf;
      }
 
-   tm_new = term_new(wn, wn->config,
-                     NULL, wn->config->login_shell, wdir,
-                     80, 24, EINA_FALSE, NULL);
-   tc_new = _solo_new(tm_new, wn);
-   evas_object_data_set(tm_new->termio, "sizedone", tm_new->termio);
+   tc_new = _term_new_solo(wn, NULL, wdir);
 
    _tabs_attach(tc, tc_new);
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to