Patch 8.1.0047
Problem:    No completion for :unlet $VAR.
Solution:   Add completion. (Jason Franklin)
Files:      src/ex_docmd.c, src/testdir/test_unlet.vim


*** ../vim-8.1.0046/src/ex_docmd.c      2018-06-12 12:39:37.585152510 +0200
--- src/ex_docmd.c      2018-06-12 16:59:13.387246272 +0200
***************
*** 4056,4063 ****
--- 4056,4071 ----
        case CMD_unlet:
            while ((xp->xp_pattern = vim_strchr(arg, ' ')) != NULL)
                arg = xp->xp_pattern + 1;
+ 
            xp->xp_context = EXPAND_USER_VARS;
            xp->xp_pattern = arg;
+ 
+           if (*xp->xp_pattern == '$')
+           {
+               xp->xp_context = EXPAND_ENV_VARS;
+               ++xp->xp_pattern;
+           }
+ 
            break;
  
        case CMD_function:
***************
*** 11277,11283 ****
         * winminheight and winminwidth need to be set to avoid an error if the
         * user has set winheight or winwidth.
         */
!       if (put_line(fd, "set winminheight=1 winheight=1 winminwidth=1 
winwidth=1") == FAIL)
            return FAIL;
        if (nr > 1 && ses_winsizes(fd, restore_size, tab_firstwin) == FAIL)
            return FAIL;
--- 11285,11294 ----
         * winminheight and winminwidth need to be set to avoid an error if the
         * user has set winheight or winwidth.
         */
!       if (put_line(fd, "set winminheight=0") == FAIL
!               || put_line(fd, "set winheight=1") == FAIL
!               || put_line(fd, "set winminwidth=0") == FAIL
!               || put_line(fd, "set winwidth=1") == FAIL)
            return FAIL;
        if (nr > 1 && ses_winsizes(fd, restore_size, tab_firstwin) == FAIL)
            return FAIL;
*** ../vim-8.1.0046/src/testdir/test_unlet.vim  2018-05-13 15:58:22.000000000 
+0200
--- src/testdir/test_unlet.vim  2018-06-12 16:59:13.391246246 +0200
***************
*** 45,47 ****
--- 45,57 ----
  
    unlet $MUST_NOT_BE_AN_ERROR
  endfunc
+ 
+ func Test_unlet_complete()
+   let g:FOOBAR = 1
+   call feedkeys(":unlet g:FOO\t\n", 'tx')
+   call assert_true(!exists('g:FOOBAR'))
+ 
+   let $FOOBAR = 1
+   call feedkeys(":unlet $FOO\t\n", 'tx')
+   call assert_true(!exists('$FOOBAR') || empty($FOOBAR))
+ endfunc
*** ../vim-8.1.0046/src/version.c       2018-06-12 16:49:26.366028607 +0200
--- src/version.c       2018-06-12 17:00:05.590909690 +0200
***************
*** 763,764 ****
--- 763,766 ----
  {   /* Add new patch number below this line */
+ /**/
+     47,
  /**/

-- 
Micro$oft: where do you want to go today?
    Linux: where do you want to go tomorrow?
  FreeBSD: are you guys coming, or what?

 /// Bram Moolenaar -- b...@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    ///

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui