To: vim_dev@googlegroups.com Subject: Patch 9.0.0667 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0667 Problem: ml_get error when 'splitkeep' is "screen". (Marius Gedminas) Solution: Check the botline is not too large. (Luuk van Baal, closes #11293, closes #11292) Files: src/window.c, src/testdir/test_window_cmd.vim *** ../vim-9.0.0667/src/window.c 2022-10-05 15:42:11.646035846 +0100 --- src/window.c 2022-10-05 18:21:18.556529882 +0100 *************** *** 6356,6362 **** if (wp->w_height != wp->w_prev_height) { // If window has moved update botline to keep the same screenlines. ! if (*p_spk == 's' && wp->w_winrow != wp->w_prev_winrow) { lnum = wp->w_cursor.lnum; diff = (wp->w_winrow - wp->w_prev_winrow) --- 6356,6363 ---- if (wp->w_height != wp->w_prev_height) { // If window has moved update botline to keep the same screenlines. ! if (*p_spk == 's' && wp->w_winrow != wp->w_prev_winrow ! && wp->w_botline - 1 <= wp->w_buffer->b_ml.ml_line_count) { lnum = wp->w_cursor.lnum; diff = (wp->w_winrow - wp->w_prev_winrow) *** ../vim-9.0.0667/src/testdir/test_window_cmd.vim 2022-10-05 11:24:42.228494178 +0100 --- src/testdir/test_window_cmd.vim 2022-10-05 18:17:10.187505810 +0100 *************** *** 1807,1812 **** --- 1807,1819 ---- let top = line('w0') help | quit call assert_equal(top, line('w0')) + " No error when resizing window in autocmd and buffer length changed + autocmd FileType qf exe "resize" line('$') + cexpr getline(1, '$') + copen + wincmd p + norm dd + cexpr getline(1, '$') %bwipeout! set splitbelow& *** ../vim-9.0.0667/src/version.c 2022-10-05 18:02:51.600571408 +0100 --- src/version.c 2022-10-05 18:19:26.900125183 +0100 *************** *** 701,702 **** --- 701,704 ---- { /* Add new patch number below this line */ + /**/ + 667, /**/ -- FIRST HEAD: Oh! quick! get the sword out I want to cut his head off. THIRD HEAD: Oh, cut your own head off. SECOND HEAD: Yes - do us all a favour. "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/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///