diff options
author | Mason Larobina <mason.larobina@gmail.com> | 2010-01-24 22:16:21 +0800 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2010-01-25 21:40:29 +0100 |
commit | 3858eef5a9f12a6784441e5117cf80e157486b3b (patch) | |
tree | 404ced147aa865a4b62d7c22866c04b6a1a603f7 | |
parent | 99052d7977745d359a0470bb0834bcd043760610 (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.
-rw-r--r-- | examples/data/plugins/bind.py | 4 |
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 |