To: vim_dev@googlegroups.com Subject: Patch 8.0.1818 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1818 (after 8.0.1810) Problem: Lines remove from wrong buffer when using terminal window. Solution: Make sure to use tl_buffer. Files: src/terminal.c *** ../vim-8.0.1817/src/terminal.c 2018-05-11 22:01:47.085458061 +0200 --- src/terminal.c 2018-05-12 16:40:11.885592244 +0200 *************** *** 1462,1467 **** --- 1462,1468 ---- sb_line_T *line; garray_T *gap; + curbuf = term->tl_buffer; gap = &term->tl_scrollback; while (curbuf->b_ml.ml_line_count > term->tl_scrollback_scrolled && gap->ga_len > 0) *************** *** 1471,1477 **** vim_free(line->sb_cells); --gap->ga_len; } ! check_cursor(); } /* --- 1472,1480 ---- vim_free(line->sb_cells); --gap->ga_len; } ! curbuf = curwin->w_buffer; ! if (curbuf == term->tl_buffer) ! check_cursor(); } /* *************** *** 1495,1502 **** /* Nothing to do if the buffer already has the lines and nothing was * changed. */ ! if (!term->tl_dirty_snapshot ! && curbuf->b_ml.ml_line_count > term->tl_scrollback_scrolled) return; ch_log(term->tl_job == NULL ? NULL : term->tl_job->jv_channel, --- 1498,1505 ---- /* Nothing to do if the buffer already has the lines and nothing was * changed. */ ! if (!term->tl_dirty_snapshot && term->tl_buffer->b_ml.ml_line_count ! > term->tl_scrollback_scrolled) return; ch_log(term->tl_job == NULL ? NULL : term->tl_job->jv_channel, *** ../vim-8.0.1817/src/version.c 2018-05-12 15:38:22.478714221 +0200 --- src/version.c 2018-05-12 16:34:07.712064623 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 1818, /**/ -- ARTHUR: Charge! [They all charge with swords drawn towards the RABBIT. A tremendous twenty second fight with Peckinpahish shots and borrowing heavily also on the Kung Fu and karate-type films ensues, in which some four KNIGHTS are comprehensively killed.] ARTHUR: Run away! Run away! "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 ///