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 -- b...@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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202010051939.095Jdv6Z2499172%40masaka.moolenaar.net.

Raspunde prin e-mail lui