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 -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20221005173043.C18431C1577%40moolenaar.net.

Raspunde prin e-mail lui