comparison src/os_unix.c @ 27334:c3d0f82f67d5 v8.2.4195

patch 8.2.4195: resizing terminal may cause to behave like CTRL-Z Commit: https://github.com/vim/vim/commit/79a6e25b79cdb35e00d8b364516103eb358d8cc7 Author: dbivolaru <dbivolaru@jacobs-alumni.de> Date: Sun Jan 23 16:41:14 2022 +0000 patch 8.2.4195: resizing terminal may cause to behave like CTRL-Z Problem: Resizing terminal may cause to behave like CTRL-Z. Solution: Set "got_tstp" only when in_mch_suspend is set. (Dorian Bivolaru, closes #9602, closes #9586)
author Bram Moolenaar <Bram@vim.org>
date Sun, 23 Jan 2022 17:45:03 +0100
parents d4e61d61afd9
children 71d606960955
comparison
equal deleted inserted replaced
27333:6782ee766b6c 27334:c3d0f82f67d5
866 if (in_mch_suspend) 866 if (in_mch_suspend)
867 { 867 {
868 signal(SIGTSTP, ignore_sigtstp ? SIG_IGN : SIG_DFL); 868 signal(SIGTSTP, ignore_sigtstp ? SIG_IGN : SIG_DFL);
869 raise(sigarg); 869 raise(sigarg);
870 } 870 }
871 else
872 got_tstp = TRUE;
871 873
872 // this is not required on all systems, but it doesn't hurt anybody 874 // this is not required on all systems, but it doesn't hurt anybody
873 signal(SIGTSTP, (RETSIGTYPE (*)())sig_tstp); 875 signal(SIGTSTP, (RETSIGTYPE (*)())sig_tstp);
874 got_tstp = TRUE;
875 SIGRETURN; 876 SIGRETURN;
876 } 877 }
877 #endif 878 #endif
878 879
879 #if defined(SIGINT) 880 #if defined(SIGINT)
6412 { 6413 {
6413 // Check whether the EINTR is caused by SIGTSTP 6414 // Check whether the EINTR is caused by SIGTSTP
6414 if (got_tstp && !in_mch_suspend) 6415 if (got_tstp && !in_mch_suspend)
6415 { 6416 {
6416 exarg_T ea; 6417 exarg_T ea;
6418
6417 ea.forceit = TRUE; 6419 ea.forceit = TRUE;
6418 ex_stop(&ea); 6420 ex_stop(&ea);
6419 got_tstp = FALSE; 6421 got_tstp = FALSE;
6420 } 6422 }
6421 6423