diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2003-12-12 22:53:27 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2003-12-12 22:53:27 +0000 |
commit | 1e212cbedcec984ce8bd6f89aa5db8e0b628435b (patch) | |
tree | 16af728e3e4b2c2a2768bee47164899ea8eca763 /Src | |
parent | 276fe6ef161b59a48d34324ec14ebb5076a9cefb (diff) | |
download | zsh-1e212cbedcec984ce8bd6f89aa5db8e0b628435b.tar.gz zsh-1e212cbedcec984ce8bd6f89aa5db8e0b628435b.tar.xz zsh-1e212cbedcec984ce8bd6f89aa5db8e0b628435b.zip |
19281: zle-line-init special widget
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 */ /***********/ |