Patch 8.1.0242
Problem:    Insert mode completion may use an invalid buffer pointer.
Solution:   Check for ins_buf to be valid. (closes #3290)
Files:      src/edit.c


*** ../vim-8.1.0241/src/edit.c  2018-08-01 19:05:59.282223206 +0200
--- src/edit.c  2018-08-07 14:53:05.865949346 +0200
***************
*** 4419,4428 ****
                                            ? (char_u *)"." : curbuf->b_p_cpt;
        last_match_pos = first_match_pos = *ini;
      }
  
      compl_old_match = compl_curr_match;       /* remember the last current 
match */
      pos = (compl_direction == FORWARD) ? &last_match_pos : &first_match_pos;
!     /* For ^N/^P loop over all the flags/windows/buffers in 'complete' */
      for (;;)
      {
        found_new_match = FAIL;
--- 4419,4433 ----
                                            ? (char_u *)"." : curbuf->b_p_cpt;
        last_match_pos = first_match_pos = *ini;
      }
+     else if (ins_buf != curbuf && !buf_valid(ins_buf))
+       ins_buf = curbuf;  // In case the buffer was wiped out.
  
      compl_old_match = compl_curr_match;       /* remember the last current 
match */
      pos = (compl_direction == FORWARD) ? &last_match_pos : &first_match_pos;
! 
!     /*
!      * For ^N/^P loop over all the flags/windows/buffers in 'complete'.
!      */
      for (;;)
      {
        found_new_match = FAIL;
*** ../vim-8.1.0241/src/version.c       2018-08-07 13:14:05.644508497 +0200
--- src/version.c       2018-08-07 14:54:09.961578224 +0200
***************
*** 796,797 ****
--- 796,799 ----
  {   /* Add new patch number below this line */
+ /**/
+     242,
  /**/

-- 
Did you ever stop to think...  and forget to start again?
                                  -- Steven Wright

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui