To: vim_dev@googlegroups.com Subject: Patch 8.0.0936 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0936 Problem: Mode() returns wrong value for a terminal window. Solution: Return 't' when typed keys go to a job. Files: src/evalfunc.c, src/testdir/test_terminal.vim *** ../vim-8.0.0935/src/evalfunc.c 2017-08-13 18:14:42.806655953 +0200 --- src/evalfunc.c 2017-08-13 20:49:03.459916857 +0200 *************** *** 7849,7854 **** --- 7849,7858 ---- buf[0] = 'x'; buf[1] = '!'; } + #ifdef FEAT_TERMINAL + else if (term_use_loop()) + buf[0] = 't'; + #endif else if (VIsual_active) { if (VIsual_select) *** ../vim-8.0.0935/src/testdir/test_terminal.vim 2017-08-13 20:26:16.040377374 +0200 --- src/testdir/test_terminal.vim 2017-08-13 20:55:02.029725474 +0200 *************** *** 42,49 **** --- 42,54 ---- call assert_match("^winpty://", job_info(g:job).tty) call assert_match("^winpty://", term_gettty('')) endif + call assert_equal('t', mode()) + call assert_match('%aR[^\n]*running]', execute('ls')) + call Stop_shell_in_terminal(buf) call term_wait(buf) + call assert_equal('n', mode()) + call assert_match('%aF[^\n]*finished]', execute('ls')) " closing window wipes out the terminal buffer a with finished job close *** ../vim-8.0.0935/src/version.c 2017-08-13 20:43:44.157865705 +0200 --- src/version.c 2017-08-13 20:50:14.779481224 +0200 *************** *** 771,772 **** --- 771,774 ---- { /* Add new patch number below this line */ + /**/ + 936, /**/ -- ERIC IDLE PLAYED: THE DEAD COLLECTOR, MR BINT (A VILLAGE NE'ER-DO -WELL VERY KEEN ON BURNING WITCHES), SIR ROBIN, THE GUARD WHO DOESN'T HICOUGH BUT TRIES TO GET THINGS STRAIGHT, CONCORDE (SIR LAUNCELOT'S TRUSTY STEED), ROGER THE SHRUBBER (A SHRUBBER), BROTHER MAYNARD "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///