To: vim_dev@googlegroups.com Subject: Patch 8.0.1814 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1814 Problem: Crash with terminal window and with 'lazyredraw' set. (Antoine) Solution: Check the terminal still exists after update_screen(). Files: src/terminal.c *** ../vim-8.0.1813/src/terminal.c 2018-05-10 18:05:52.541048471 +0200 --- src/terminal.c 2018-05-11 20:45:11.569016879 +0200 *************** *** 38,43 **** --- 38,46 ---- * in tl_scrollback are no longer used. * * TODO: + * - Win32: Termdebug doesn't work, because gdb does not support mi2. This + * plugin: https://github.com/cpiger/NeoDebug runs gdb as a job, redirecting + * input and output. Command I/O is in gdb window. * - Win32: Redirecting input does not work, half of Test_terminal_redir_file() * is disabled. * - Win32: Redirecting output works but includes escape sequences. *************** *** 971,977 **** if (buffer == curbuf) { update_screen(0); ! update_cursor(term, TRUE); } else redraw_after_callback(TRUE); --- 974,983 ---- if (buffer == curbuf) { update_screen(0); ! /* update_screen() can be slow, check the terminal wasn't closed ! * already */ ! if (buffer == curbuf && curbuf->b_term != NULL) ! update_cursor(curbuf->b_term, TRUE); } else redraw_after_callback(TRUE); *************** *** 2100,2105 **** --- 2106,2115 ---- while (must_redraw != 0) if (update_screen(0) == FAIL) break; + if (!term_use_loop_check(TRUE)) + /* job finished while redrawing */ + break; + update_cursor(curbuf->b_term, FALSE); restore_cursor = TRUE; *** ../vim-8.0.1813/src/version.c 2018-05-10 21:24:31.129144642 +0200 --- src/version.c 2018-05-11 20:44:05.545429109 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 1814, /**/ -- Q: How do you tell the difference between a female cat and a male cat? A: You ask it a question and if HE answers, it's a male but, if SHE answers, it's a female. /// 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 ///