Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: add-zle-hook-widget: infinite recursion ("job table full or recursion limit exceeded")
- X-seq: zsh-workers 39131
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: add-zle-hook-widget: infinite recursion ("job table full or recursion limit exceeded")
- Date: Tue, 30 Aug 2016 16:31:38 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=HU/dVwHeFW7O/iMJugL3KP6hbRNs/wZpIwKxNWrwwQc=; b=uySMpgSQ8w+7G4Ytc+1dsf+OsHUIpE7mAa0NL9CliLYsJR69nUaD32LNPdivl/7Cj8 k/mnGAIhb5LF/JH+eIxVMn4wdkTfGkdEC9LPjj2hS7RlnQuqVx/JtM5/E5RSD+kWWswL 8dSuyzT3dQs9O3BuXy3JqupRYhDvq6dAIp0MU26Dp4A1EXRQsH9O86mEdFFX1V/Ci/cw Lpvo6u2Lrwgno1HYDWz/IMa24Vt41obLUQb5XDw3qsAGkfwOX85j+owgGttPWFxlyd70 1H24nMZrZidvZoEX9KnPC4TtmuiBH8OH+YNABv8AWbXitUK1tJ8BHQOJHwQF1Li3d4jA ZPHg==
- In-reply-to: <20160830172302.GA16145@fujitsu.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20160830172302.GA16145@fujitsu.shahaf.local2>
On Aug 30, 5:23pm, Daniel Shahaf wrote:
} Subject: add-zle-hook-widget: infinite recursion ("job table full or recur
}
} +add-zle-hook-widget:21> '(anon)' zle-line-pre-redraw f
} +(anon):2> emulate -L zsh
} +(anon):5> zmodload -e zsh/zle
} +(anon):5> return 1
Ah ...
} Running 'zmodload zsh/zle' before the call appears to prevent hte
} problem. I can do that in my callsite (z-sy-h's "make check"), but
} I assume zsh shouldn't enter an infinite loop, either.
Need to move the sanity checks out of the anonymous function. Unless
someone suggests a variation of "return" that works like "break 2".
diff --git a/Functions/Misc/add-zle-hook-widget b/Functions/Misc/add-zle-hook-widget
index c47d9a3..572de25 100644
--- a/Functions/Misc/add-zle-hook-widget
+++ b/Functions/Misc/add-zle-hook-widget
@@ -18,10 +18,6 @@
#
# The -L option lists the hooks and their associated widgets.
-() { # Preserve caller global option settings
-
-emulate -L zsh
-
# This is probably more safeguarding than necessary
zmodload -e zsh/zle || return 1
{ zmodload zsh/parameter && zmodload zsh/zleparameter } || {
@@ -29,6 +25,10 @@ zmodload -e zsh/zle || return 1
return 1
}
+() { # Preserve caller global option settings
+
+emulate -L zsh
+
# Setup - create the base functions for hook widgets that call the others
local -a hooktypes=( zle-isearch-exit zle-isearch-update
Messages sorted by:
Reverse Date,
Date,
Thread,
Author