fix(ui): guard password/TLS prompt redraw while suspended
inp_get_line()/inp_get_password() issued an unconditional doupdate() before their input loop. If such a prompt is raised while an external editor is active (e.g. a reconnect password or TLS-cert prompt arriving via session_process_events), that doupdate() writes over the editor. Guard it with is_suspended || isendwin(), matching the inp_readline() guard, so it fails safe even if a stray write later clears isendwin(). This closes the one suspended-write path the upstream fix left open.
This commit is contained in:
@@ -311,7 +311,10 @@ inp_get_line(void)
|
|||||||
werase(inp_win);
|
werase(inp_win);
|
||||||
wmove(inp_win, 0, 0);
|
wmove(inp_win, 0, 0);
|
||||||
_inp_win_update_virtual();
|
_inp_win_update_virtual();
|
||||||
doupdate();
|
// Don't write to the terminal while suspended (external editor active).
|
||||||
|
if (!is_suspended && !isendwin()) {
|
||||||
|
doupdate();
|
||||||
|
}
|
||||||
char* line = NULL;
|
char* line = NULL;
|
||||||
while (!line) {
|
while (!line) {
|
||||||
line = inp_readline();
|
line = inp_readline();
|
||||||
@@ -338,7 +341,10 @@ inp_get_password(void)
|
|||||||
werase(inp_win);
|
werase(inp_win);
|
||||||
wmove(inp_win, 0, 0);
|
wmove(inp_win, 0, 0);
|
||||||
_inp_win_update_virtual();
|
_inp_win_update_virtual();
|
||||||
doupdate();
|
// Don't write to the terminal while suspended (external editor active).
|
||||||
|
if (!is_suspended && !isendwin()) {
|
||||||
|
doupdate();
|
||||||
|
}
|
||||||
char* password = NULL;
|
char* password = NULL;
|
||||||
get_password = TRUE;
|
get_password = TRUE;
|
||||||
while (!password) {
|
while (!password) {
|
||||||
|
|||||||
Reference in New Issue
Block a user