Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
poezio
poezio
Commits
116c167e
Commit
116c167e
authored
Apr 17, 2021
by
mathieui
Browse files
fix: allow certificate confirm dialog resize
fixes
#3371
parent
11de2d98
Pipeline
#3908
passed with stages
in 6 minutes and 24 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
poezio/core/core.py
poezio/core/core.py
+1
-1
poezio/core/handlers.py
poezio/core/handlers.py
+10
-4
No files found.
poezio/core/core.py
View file @
116c167e
...
...
@@ -617,7 +617,7 @@ class Core:
pass
sys
.
__excepthook__
(
typ
,
value
,
trace
)
def
sigwinch_handler
(
self
):
def
sigwinch_handler
(
self
,
*
args
):
"""A work-around for ncurses resize stuff, which sucks. Normally, ncurses
catches SIGWINCH itself. In its signal handler, it updates the
windows structures (for example the size, etc) and it
...
...
poezio/core/handlers.py
View file @
116c167e
...
...
@@ -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
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment