Patch 8.2.1289
Problem:    Crash when using a custom completion function.
Solution:   Initialize all of the expand_T. (closes #6532)
Files:      src/cmdexpand.c


*** ../vim-8.2.1288/src/cmdexpand.c     2020-07-21 21:07:00.716496755 +0200
--- src/cmdexpand.c     2020-07-25 14:09:13.409696136 +0200
***************
*** 494,511 ****
      void
  ExpandInit(expand_T *xp)
  {
!     xp->xp_pattern = NULL;
!     xp->xp_pattern_len = 0;
      xp->xp_backslash = XP_BS_NONE;
- #ifndef BACKSLASH_IN_FILENAME
-     xp->xp_shell = FALSE;
- #endif
      xp->xp_numfiles = -1;
-     xp->xp_files = NULL;
- #if defined(FEAT_EVAL)
-     xp->xp_arg = NULL;
- #endif
-     xp->xp_line = NULL;
  }
  
  /*
--- 494,502 ----
      void
  ExpandInit(expand_T *xp)
  {
!     CLEAR_POINTER(xp);
      xp->xp_backslash = XP_BS_NONE;
      xp->xp_numfiles = -1;
  }
  
  /*
***************
*** 2425,2431 ****
  # if defined(FEAT_EVAL)
  /*
   * Call "user_expand_func()" to invoke a user defined Vim script function and
!  * return the result (either a string or a List).
   */
      static void *
  call_user_expand_func(
--- 2416,2422 ----
  # if defined(FEAT_EVAL)
  /*
   * Call "user_expand_func()" to invoke a user defined Vim script function and
!  * return the result (either a string, a List or NULL).
   */
      static void *
  call_user_expand_func(
*** ../vim-8.2.1288/src/version.c       2020-07-24 18:47:18.607480118 +0200
--- src/version.c       2020-07-25 14:10:24.589435921 +0200
***************
*** 756,757 ****
--- 756,759 ----
  {   /* Add new patch number below this line */
+ /**/
+     1289,
  /**/

-- 
ASCII stupid question, get a stupid ANSI.

 /// 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202007251212.06PCCdut298149%40masaka.moolenaar.net.

Raspunde prin e-mail lui