Patch 8.1.2015
Problem:    Terminal altscreen test still fails sometimes.
Solution:   Write the escape sequence in a file.
Files:      src/testdir/test_terminal.vim


*** ../vim-8.1.2014/src/testdir/test_terminal.vim       2019-09-08 
22:09:49.241312339 +0200
--- src/testdir/test_terminal.vim       2019-09-08 22:34:04.400755513 +0200
***************
*** 2088,2103 ****
  endfunc
  
  func Test_terminal_altscreen()
!   CheckUnix
  
    let buf = term_start(&shell, {})
! 
!   call term_sendkeys(buf, 'echo "\e[?1047h"' .. "\r")
    call WaitForAssert({-> assert_equal(1, term_getaltscreen(buf))})
  
!   call term_sendkeys(buf, 'echo "\e[?1047l"' .. "\r")
    call WaitForAssert({-> assert_equal(0, term_getaltscreen(buf))})
  
    call term_sendkeys(buf, "exit\r")
    exe buf . "bwipe!"
  endfunc
--- 2088,2109 ----
  endfunc
  
  func Test_terminal_altscreen()
!   if has('win32')
!     let cmd = "type Xtext\<CR>"
!   else
!     let cmd = "cat Xtext\<CR>"
!   endif
  
    let buf = term_start(&shell, {})
!   call writefile(["\<Esc>[?1047h"], 'Xtext')
!   call term_sendkeys(buf, cmd)
    call WaitForAssert({-> assert_equal(1, term_getaltscreen(buf))})
  
!   call writefile(["\<Esc>[?1047l"], 'Xtext')
!   call term_sendkeys(buf, cmd)
    call WaitForAssert({-> assert_equal(0, term_getaltscreen(buf))})
  
    call term_sendkeys(buf, "exit\r")
    exe buf . "bwipe!"
+   call delete('Xtext')
  endfunc
*** ../vim-8.1.2014/src/version.c       2019-09-08 22:09:49.241312339 +0200
--- src/version.c       2019-09-08 22:34:52.712595783 +0200
***************
*** 759,760 ****
--- 759,762 ----
  {   /* Add new patch number below this line */
+ /**/
+     2015,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
225. You sign up for free subscriptions for all the computer magazines

 /// Bram Moolenaar -- [email protected] -- 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201909082036.x88KaDDr017072%40masaka.moolenaar.net.

Raspunde prin e-mail lui