To: vim_dev@googlegroups.com Subject: Patch 8.0.0824 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0824 Problem: In Terminal mode the cursor and screen gets redrawn when the job produces output. Solution: Check for tl_terminal_mode. (partly by Yasuhiro Matsumoto, closes #1904) Files: src/terminal.c *** ../vim-8.0.0823/src/terminal.c 2017-07-30 21:45:59.871952976 +0200 --- src/terminal.c 2017-07-31 21:16:08.475598174 +0200 *************** *** 36,41 **** --- 36,44 ---- * that buffer, attributes come from the scrollback buffer tl_scrollback. * * TODO: + * - Use "." for current line instead of optional. + * - make row and cols one-based instead of zero-based in term_ functions. + * - Add StatusLineTerm highlighting * - in bash mouse clicks are inserting characters. * - mouse scroll: when over other window, scroll that window. * - For the scrollback buffer store lines in the buffer, only attributes in *************** *** 351,356 **** --- 354,361 ---- static void update_cursor(term_T *term, int redraw) { + if (term->tl_terminal_mode) + return; setcursor(); if (redraw && term->tl_buffer == curbuf) { *************** *** 382,390 **** ch_logn(channel, "writing %d bytes to terminal", (int)len); term_write_job_output(term, msg, len); ! /* TODO: only update once in a while. */ ! update_screen(0); ! update_cursor(term, TRUE); } /* --- 387,398 ---- ch_logn(channel, "writing %d bytes to terminal", (int)len); term_write_job_output(term, msg, len); ! if (!term->tl_terminal_mode) ! { ! /* TODO: only update once in a while. */ ! update_screen(0); ! update_cursor(term, TRUE); ! } } /* *************** *** 1081,1087 **** if (wp->w_buffer == term->tl_buffer) position_cursor(wp, &pos); } ! if (term->tl_buffer == curbuf) { may_toggle_cursor(term); update_cursor(term, term->tl_cursor_visible); --- 1089,1095 ---- if (wp->w_buffer == term->tl_buffer) position_cursor(wp, &pos); } ! if (term->tl_buffer == curbuf && !term->tl_terminal_mode) { may_toggle_cursor(term); update_cursor(term, term->tl_cursor_visible); *************** *** 2009,2018 **** msg += MB_PTR2LEN(msg); } ! /* TODO: only update once in a while. */ ! update_screen(0); ! if (buf == curbuf) ! update_cursor(term, TRUE); } /* --- 2017,2029 ---- msg += MB_PTR2LEN(msg); } ! if (!term->tl_terminal_mode) ! { ! /* TODO: only update once in a while. */ ! update_screen(0); ! if (buf == curbuf) ! update_cursor(term, TRUE); ! } } /* *** ../vim-8.0.0823/src/version.c 2017-07-30 21:45:59.871952976 +0200 --- src/version.c 2017-07-31 21:17:11.555151535 +0200 *************** *** 771,772 **** --- 771,774 ---- { /* Add new patch number below this line */ + /**/ + 824, /**/ -- Not too long ago, compress was something you did to garbage... /// 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 ///