ncdirect: call rl_deprep_terminal first

This commit is contained in:
nick black 2021-01-10 06:17:23 -05:00
parent 8283adc28f
commit 78a6ffdd22
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -597,6 +597,9 @@ static int
ncdirect_stop_minimal(void* vnc){
ncdirect* nc = static_cast<ncdirect*>(vnc);
int ret = drop_signals(nc);
if(!(nc->flags & NCDIRECT_OPTION_NO_READLINE)){
rl_deprep_terminal();
}
if(nc->tcache.op && term_emit("op", nc->tcache.op, nc->ttyfp, true)){
ret = -1;
}
@ -615,9 +618,6 @@ ncdirect_stop_minimal(void* vnc){
}
ret |= close(nc->ctermfd);
}
if(!(nc->flags & NCDIRECT_OPTION_NO_READLINE)){
rl_deprep_terminal();
}
return ret;
}