From bfb24d38da2d0e2ce644ed56c445f74115661be9 Mon Sep 17 00:00:00 2001 From: Paul Nameless Date: Thu, 21 May 2020 15:16:16 +0800 Subject: [PATCH] Add esc handler when writing msg --- tg/views/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tg/views/__init__.py b/tg/views/__init__.py index 0d228e1..64cd8b0 100644 --- a/tg/views/__init__.py +++ b/tg/views/__init__.py @@ -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, ) cancel buff = "" break elif chr(key).isprintable():