summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0047
diff options
context:
space:
mode:
Diffstat (limited to 'data/vim/patches/8.1.0047')
-rw-r--r--data/vim/patches/8.1.004793
1 files changed, 93 insertions, 0 deletions
diff --git a/data/vim/patches/8.1.0047 b/data/vim/patches/8.1.0047
new file mode 100644
index 000000000..da8bf42f0
--- /dev/null
+++ b/data/vim/patches/8.1.0047
@@ -0,0 +1,93 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0047
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+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 -- Bram@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 ///