Fix some remaining issues of #16747 (#16760)

* Fix mintty issue with mouse clicks/scroll wheel after quit

* Fix alacritty issue with stty
This commit is contained in:
Khairul Azhar Kasmiran 2020-05-03 22:06:50 +08:00 committed by GitHub
parent 153de56173
commit 8484a1b103
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -576,6 +576,9 @@ R_API RCons *r_cons_new() {
}
R_API RCons *r_cons_free() {
#if __WINDOWS__
r_cons_enable_mouse (false);
#endif
I.refcnt--;
if (I.refcnt != 0) {
return NULL;
@ -1434,6 +1437,11 @@ R_API int r_cons_is_vtcompat(void) {
free (wt_session);
return 2;
}
char *alacritty = r_sys_getenv ("ALACRITTY_LOG");
if (alacritty) {
free (alacritty);
return 1;
}
char *term = r_sys_getenv ("TERM");
if (term) {
if (strstr (term, "xterm")) {