Forgot to remove from recent when adding to top of list

This commit is contained in:
Kovid Goyal 2018-02-12 12:39:02 +05:30
parent 34ca8419bb
commit 193ac6cd81
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -274,6 +274,10 @@ def main(args=sys.argv):
loop.loop(handler)
if handler.current_char and loop.return_code == 0:
print('OK:', hex(ord(handler.current_char))[2:])
try:
handler.recent.remove(ord(handler.current_char))
except Exception:
pass
recent = [ord(handler.current_char)] + handler.recent
cached_values['recent'] = recent[:len(DEFAULT_SET)]
raise SystemExit(loop.return_code)