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

git pushed a commit to branch master
in repository efm2.

View the commit online.

commit 5e0c87971aa687b298464296ea94c7b300e2bf19
Author: Carsten Haitzler (Rasterman) <[email protected]>
AuthorDate: Fri Jan 23 11:54:17 2026 +0000

    typebuf - check for glob properly
    
    only add * at end if no globs exist ... properly
---
 src/efm/efm_typebuf.c | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/src/efm/efm_typebuf.c b/src/efm/efm_typebuf.c
index 3c3104d..f3ca29e 100644
--- a/src/efm/efm_typebuf.c
+++ b/src/efm/efm_typebuf.c
@@ -65,6 +65,30 @@ _typebuf_command_str_build_args(Eina_Strbuf *buf, const char *str,
   free(s2);
 }
 
+static Eina_Bool
+_has_glob(const char *glob)
+{
+  int i;
+  const char *s = glob;
+  Eina_Bool escaped = EINA_FALSE;
+
+  for (i = 0; s[i]; i++)
+    {
+      if (s[i] == '\\')
+        {
+          if (!escaped) escaped = EINA_TRUE;
+          else escaped = EINA_FALSE;
+        }
+      else if ((s[i] == '*') || (s[i] == '*') || (s[i] == '*') || (s[i] == '*'))
+        {
+          if (!escaped) return EINA_TRUE;
+          else escaped = EINA_FALSE;
+        }
+      else escaped = EINA_FALSE;
+    }
+  return EINA_FALSE;
+}
+
 static void
 _typebuf_update(Smart_Data *sd, const char *str)
 {
@@ -86,9 +110,7 @@ _typebuf_update(Smart_Data *sd, const char *str)
           if (tblen == 0) _efm_sel_none(sd);
           else
             {
-              if ((str[tblen - 1] != '*')
-                  && (str[tblen - 1] != ']')
-                  && (str[tblen - 1] != '?'))
+              if (!_has_glob(str))
                 { // if we don't end in * or ] or ? assume a * on the end
                   char *tb = alloca(tblen + 2);
 

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

Reply via email to