summaryrefslogtreecommitdiff
path: root/poezio/core/handlers.py
diff options
context:
space:
mode:
Diffstat (limited to 'poezio/core/handlers.py')
-rw-r--r--poezio/core/handlers.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py
index a8226541..6262a1d5 100644
--- a/poezio/core/handlers.py
+++ b/poezio/core/handlers.py
@@ -10,6 +10,7 @@ import asyncio
import curses
import functools
import select
+import signal
import ssl
import sys
import time
@@ -1463,11 +1464,16 @@ class HandlerCore:
self.core.add_tab(confirm_tab, True)
self.core.doupdate()
+ # handle resize
+ prev_value = signal.signal(signal.SIGWINCH, self.core.sigwinch_handler)
while not confirm_tab.done:
- sel = select.select([sys.stdin], [], [], 5)[0]
-
- if sel:
- self.core.on_input_readable()
+ try:
+ sel = select.select([sys.stdin], [], [], 0.5)[0]
+ if sel:
+ self.core.on_input_readable()
+ except:
+ continue
+ signal.signal(signal.SIGWINCH, prev_value)
def validate_ssl(self, pem):
"""