From 2ff2be5d395dc8ba638a2cab7716788ce8ed6817 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Thu, 1 Jul 2010 20:11:39 +0800 Subject: Simplify backspace bugfix --- examples/data/plugins/keycmd.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'examples/data/plugins/keycmd.py') 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:] -- cgit v1.2.3