diff options
author | Paweł Zuzelski <pawelz@pld-linux.org> | 2010-07-01 08:47:18 +0200 |
---|---|---|
committer | Paweł Zuzelski <pawelz@pld-linux.org> | 2010-07-01 08:47:18 +0200 |
commit | 0ba5e2ed5678a5ff95fe3146fbbe7b8edd1b7c7b (patch) | |
tree | 784b2f33da57a8bcad0b833d02e05497addf0983 /examples/data/plugins | |
parent | ba24e1b02a9fdd58fc1a455c79f9f06880fae424 (diff) |
Fix the backspace issue.
There was a bug in keycmd plugin. When cursor was already at the begining of
the string, ‘backspace’ key duplicated the content of prompt and set cursor
position to negative value.
Diffstat (limited to 'examples/data/plugins')
-rw-r--r-- | examples/data/plugins/keycmd.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/data/plugins/keycmd.py b/examples/data/plugins/keycmd.py index b600afe..503b539 100644 --- a/examples/data/plugins/keycmd.py +++ b/examples/data/plugins/keycmd.py @@ -429,6 +429,9 @@ def keycmd_backspace(uzbl, *args): if not k.keycmd: return + if k.cursor == 0: + return + k.keycmd = k.keycmd[:k.cursor-1] + k.keycmd[k.cursor:] k.cursor -= 1 update_event(uzbl, k, False) |