To: vim-dev@vim.org Subject: Patch 6.1.339 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.339 Problem: Completion doesn't allow "g:" in ":let g:did_". (Benji Fisher) Solution: Return "g:var" for global variables when that is what is being expanded. (Flemming Madsen) Files: src/eval.c *** ../vim61.338/src/eval.c Tue Jan 28 22:17:41 2003 --- src/eval.c Sun Feb 16 16:27:13 2003 *************** *** 1234,1240 **** && gidx < variables.ga_len) /* skip */; if (name != NULL) ! return name; } if (bidx < curbuf->b_vars.ga_len) /* Current buffer variables */ { --- 1234,1245 ---- && gidx < variables.ga_len) /* skip */; if (name != NULL) ! { ! if (STRNCMP("g:", xp->xp_pattern, 2) == 0) ! return cat_prefix_varname('g', name); ! else ! return name; ! } } if (bidx < curbuf->b_vars.ga_len) /* Current buffer variables */ { *** ../vim61.338/src/version.c Sun Feb 16 22:52:39 2003 --- src/version.c Sun Feb 16 22:54:21 2003 *************** *** 608,609 **** --- 612,615 ---- { /* Add new patch number below this line */ + /**/ + 339, /**/ -- There is a fine line between courage and foolishness. Unfortunately, it's not a fence. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///