To: vim_dev@googlegroups.com Subject: Patch 8.2.1805 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1805 Problem: Unix: terminal mode changed when using ":shell". Solution: Avoid calling settmode() when not needed. (issue #7079) Files: src/os_unix.c *** ../vim-8.2.1804/src/os_unix.c 2020-09-13 22:00:08.983392136 +0200 --- src/os_unix.c 2020-10-05 21:29:13.037366702 +0200 *************** *** 585,590 **** --- 585,591 ---- mch_delay(long msec, int flags) { tmode_T old_tmode; + int call_settmode; #ifdef FEAT_MZSCHEME long total = msec; // remember original value #endif *************** *** 596,605 **** // shell may produce SIGQUIT). // Only do this if sleeping for more than half a second. in_mch_delay = TRUE; ! old_tmode = mch_cur_tmode; ! if (mch_cur_tmode == TMODE_RAW ! && (msec > 500 || (flags & MCH_DELAY_SETTMODE))) settmode(TMODE_SLEEP); /* * Everybody sleeps in a different way... --- 597,609 ---- // shell may produce SIGQUIT). // Only do this if sleeping for more than half a second. in_mch_delay = TRUE; ! call_settmode = mch_cur_tmode == TMODE_RAW ! && (msec > 500 || (flags & MCH_DELAY_SETTMODE)); ! if (call_settmode) ! { ! old_tmode = mch_cur_tmode; settmode(TMODE_SLEEP); + } /* * Everybody sleeps in a different way... *************** *** 653,659 **** while (total > 0); #endif ! if (msec > 500 || (flags & MCH_DELAY_SETTMODE)) settmode(old_tmode); in_mch_delay = FALSE; } --- 657,663 ---- while (total > 0); #endif ! if (call_settmode) settmode(old_tmode); in_mch_delay = FALSE; } *** ../vim-8.2.1804/src/version.c 2020-10-05 20:38:02.469117560 +0200 --- src/version.c 2020-10-05 21:32:41.360656449 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 1805, /**/ -- I wonder how much deeper the ocean would be without sponges. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///