Merge pull request #48 from paul-nameless/add-esc-handler

Add esc handler when writing msg
This commit is contained in:
Nameless 2020-05-21 15:22:20 +08:00 committed by GitHub
commit c7e17bb753
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -109,7 +109,7 @@ class StatusView:
elif key == 127: # del
if buff:
buff = buff[:-1]
elif key == 7: # ^G cancel
elif key in (7, 27): # (^G, <esc>) cancel
buff = ""
break
elif chr(key).isprintable():