diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/zle_main.c | 12 | ||||
-rw-r--r-- | Src/Zle/zle_thingy.c | 11 |
2 files changed, 22 insertions, 1 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index 15423d231..c3317175c 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -348,7 +348,8 @@ raw_getkey(int keytmout, char *cptr) { long exp100ths; int ret; -#ifdef HAS_TIO +#if defined(HAS_TIO) && \ + (defined(sun) || (!defined(HAVE_POLL) && !defined(HAVE_SELECT))) struct ttyinfo ti; #endif #ifndef HAVE_POLL @@ -739,6 +740,7 @@ zleread(char *lp, char *rp, int flags) unsigned char *s; int old_errno = errno; int tmout = getiparam("TMOUT"); + Thingy initthingy; #if defined(HAVE_POLL) || defined(HAVE_SELECT) baud = getiparam("BAUD"); @@ -821,6 +823,14 @@ zleread(char *lp, char *rp, int flags) initmodifier(&zmod); prefixflag = 0; + if ((initthingy = rthingy_nocreate("zle-line-init"))) { + char *args[2]; + args[0] = initthingy->nam; + args[1] = NULL; + execzlefunc(initthingy, args); + unrefthingy(initthingy); + } + zlecore(); statusline = NULL; diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c index 71eab02e7..91ee2c010 100644 --- a/Src/Zle/zle_thingy.c +++ b/Src/Zle/zle_thingy.c @@ -164,6 +164,17 @@ rthingy(char *nam) return refthingy(t); } +/**/ +Thingy +rthingy_nocreate(char *nam) +{ + Thingy t = (Thingy) thingytab->getnode2(thingytab, nam); + + if(!t) + return NULL; + return refthingy(t); +} + /***********/ /* widgets */ /***********/ |