From: NeilBrown Date: Wed, 28 Jun 2023 06:52:35 +0000 (+1000) Subject: macro: don't walk up tree to "find" input. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=38123e53521d20f83ffc83988826520272d1b0f8;p=edlib.git macro: don't walk up tree to "find" input. We can send "Keystroke" to the focus and it will find the right target. We don't need to "find" the target first. Doing so is fragile. Signed-off-by: NeilBrown --- diff --git a/python/lib-macro.py b/python/lib-macro.py index fb288211..87e4ca2a 100644 --- a/python/lib-macro.py +++ b/python/lib-macro.py @@ -112,8 +112,6 @@ def play_macro(key, focus, num, str, **a): mac = focus.call("history:get-last", docname, num, ret='str') if not mac: return edlib.Efail - while focus.parent != focus.parent.parent: - focus = focus.parent keys = macro_split(mac) error = False i = 0