To: vim_dev@googlegroups.com Subject: Patch 8.2.1783 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1783 (after 8.2.1781) Problem: Try-catch test fails. Solution: Don't call win_enter(), only call enterering_window(). Files: src/autocmd.c, src/window.c, src/proto/window.pro, src/testdir/runtest.vim *** ../vim-8.2.1782/src/autocmd.c 2020-10-01 20:03:00.769332224 +0200 --- src/autocmd.c 2020-10-01 22:34:17.711990357 +0200 *************** *** 1533,1550 **** unblock_autocmds(); if (win_valid(aco->save_curwin)) ! win_enter(aco->save_curwin, TRUE); else // Hmm, original window disappeared. Just use the first one. curwin = firstwin; if (win_valid(aco->save_prevwin)) prevwin = aco->save_prevwin; #ifdef FEAT_EVAL vars_clear(&aucmd_win->w_vars->dv_hashtab); // free all w: variables hash_init(&aucmd_win->w_vars->dv_hashtab); // re-use the hashtab #endif - curbuf = curwin->w_buffer; - vim_free(globaldir); globaldir = aco->globaldir; --- 1533,1554 ---- unblock_autocmds(); if (win_valid(aco->save_curwin)) ! curwin = aco->save_curwin; else // Hmm, original window disappeared. Just use the first one. curwin = firstwin; + curbuf = curwin->w_buffer; + #ifdef FEAT_JOB_CHANNEL + // May need to restore insert mode for a prompt buffer. + entering_window(curwin); + #endif + if (win_valid(aco->save_prevwin)) prevwin = aco->save_prevwin; #ifdef FEAT_EVAL vars_clear(&aucmd_win->w_vars->dv_hashtab); // free all w: variables hash_init(&aucmd_win->w_vars->dv_hashtab); // re-use the hashtab #endif vim_free(globaldir); globaldir = aco->globaldir; *** ../vim-8.2.1782/src/window.c 2020-10-01 19:06:31.847610500 +0200 --- src/window.c 2020-10-01 22:33:32.020134235 +0200 *************** *** 2227,2233 **** } } ! static void entering_window(win_T *win) { // Only matters for a prompt window. --- 2227,2233 ---- } } ! void entering_window(win_T *win) { // Only matters for a prompt window. *** ../vim-8.2.1782/src/proto/window.pro 2020-08-09 14:03:51.541367942 +0200 --- src/proto/window.pro 2020-10-01 22:33:30.876137855 +0200 *************** *** 10,15 **** --- 10,16 ---- int make_windows(int count, int vertical); void win_move_after(win_T *win1, win_T *win2); void win_equal(win_T *next_curwin, int current, int dir); + void entering_window(win_T *win); void close_windows(buf_T *buf, int keep_curwin); int one_window(void); int win_close(win_T *win, int free_buf); *** ../vim-8.2.1782/src/testdir/runtest.vim 2020-09-27 22:47:01.880163387 +0200 --- src/testdir/runtest.vim 2020-10-01 22:07:22.536854735 +0200 *************** *** 227,233 **** --- 227,238 ---- " Close any extra tab pages and windows and make the current one not modified. while tabpagenr('$') > 1 + let winid = win_getid() quit! + if winid == win_getid() + echoerr 'Could not quit window' + break + endif endwhile while 1 *** ../vim-8.2.1782/src/version.c 2020-10-01 21:37:17.798009505 +0200 --- src/version.c 2020-10-01 22:37:09.883457638 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 1783, /**/ -- How To Keep A Healthy Level Of Insanity: 4. Put your garbage can on your desk and label it "in". /// 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 ///