diff options
author | Mason Larobina <mason.larobina@gmail.com> | 2010-07-01 20:11:39 +0800 |
---|---|---|
committer | Mason Larobina <mason.larobina@gmail.com> | 2010-07-01 20:11:39 +0800 |
commit | 2ff2be5d395dc8ba638a2cab7716788ce8ed6817 (patch) | |
tree | f52789f6e6071ed45084cda7fec49448005ef98b | |
parent | e59fa83900bb9b9ee74d80445e73ed01f4ad33bb (diff) |
Simplify backspace bugfix
-rw-r--r-- | examples/data/plugins/keycmd.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/data/plugins/keycmd.py b/examples/data/plugins/keycmd.py index 503b539..2fb2283 100644 --- a/examples/data/plugins/keycmd.py +++ b/examples/data/plugins/keycmd.py @@ -426,10 +426,7 @@ def keycmd_backspace(uzbl, *args): '''Removes the character at the cursor position in the keycmd.''' k = uzbl.keylet - if not k.keycmd: - return - - if k.cursor == 0: + if not k.keycmd or not k.cursor: return k.keycmd = k.keycmd[:k.cursor-1] + k.keycmd[k.cursor:] |