aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/plugins/bind.py
diff options
context:
space:
mode:
authorGravatar Mason Larobina <mason.larobina@gmail.com>2010-01-24 22:16:21 +0800
committerGravatar Dieter Plaetinck <dieter@plaetinck.be>2010-01-25 21:40:29 +0100
commit3858eef5a9f12a6784441e5117cf80e157486b3b (patch)
tree404ced147aa865a4b62d7c22866c04b6a1a603f7 /examples/data/plugins/bind.py
parent99052d7977745d359a0470bb0834bcd043760610 (diff)
Consistency fix in the bind plugin with regard to '*' binds.
The problem (as highlighted by the link following scripts) was that when the user enters a stack bind (like a "fl<link:>*" bind) that binds command isn't executed with a null argument. When you do the equivalent without stack binds (like a "fl*" bind) that binds command is executed with a null argument as soon as you type "fl". This behaviour is useful and exploited heavily by the link following scripts which use the null argument as a trigger to "numberize" all the links in the visible area.
Diffstat (limited to 'examples/data/plugins/bind.py')
-rw-r--r--examples/data/plugins/bind.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/data/plugins/bind.py b/examples/data/plugins/bind.py
index 1dd2ee8..a1a5d89 100644
--- a/examples/data/plugins/bind.py
+++ b/examples/data/plugins/bind.py
@@ -431,6 +431,10 @@ def match_and_exec(uzbl, bind, depth, keylet, bindlet):
elif more:
bindlet.stack(bind, args, depth)
+ (on_exec, has_args, mod_cmd, glob, more) = bind[depth+1]
+ if not on_exec and has_args and not glob and not more:
+ exec_bind(uzbl, bind, *(args+['',]))
+
return False
args = bindlet.args + args