To: vim-dev@vim.org Subject: Patch 6.1.172 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.172 Problem: Command line completion of ":tag /pat" does not show the same results as the tags the command actually finds. (Gilles Roy) Solution: Don't modify the pattern to make it a regexp. Files: src/ex_getln.c, src/tag.c *** ../vim61.171/src/ex_getln.c Sun Jul 14 16:37:14 2002 --- src/ex_getln.c Sat Sep 7 14:58:21 2002 *************** *** 2925,2934 **** * use with vim_regcomp(). First work out how long it will be: */ ! /* for help tags the translation is done in find_help_tags() */ if (context == EXPAND_HELP || context == EXPAND_COLORS ! || context == EXPAND_COMPILER) retval = vim_strnsave(fname, len); else { --- 2933,2944 ---- * use with vim_regcomp(). First work out how long it will be: */ ! /* For help tags the translation is done in find_help_tags(). ! * For a tag pattern starting with "/" no translation is needed. */ if (context == EXPAND_HELP || context == EXPAND_COLORS ! || context == EXPAND_COMPILER ! || (context == EXPAND_TAGS && fname[0] == '/')) retval = vim_strnsave(fname, len); else { *** ../vim61.171/src/tag.c Thu May 16 22:01:33 2002 --- src/tag.c Sat Sep 7 14:58:58 2002 *************** *** 2961,2968 **** tagnmflag = TAG_NAMES; else tagnmflag = 0; ! if (pat[0] == '^' && pat[1] == '/') ! ret = find_tags(pat + 2, num_file, file, TAG_REGEXP | tagnmflag | TAG_VERBOSE, TAG_MANY); else ret = find_tags(pat, num_file, file, --- 2961,2968 ---- tagnmflag = TAG_NAMES; else tagnmflag = 0; ! if (pat[0] == '/') ! ret = find_tags(pat + 1, num_file, file, TAG_REGEXP | tagnmflag | TAG_VERBOSE, TAG_MANY); else ret = find_tags(pat, num_file, file, *** ../vim61.171/src/version.c Fri Aug 30 22:36:15 2002 --- src/version.c Sat Sep 7 15:03:57 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 172, /**/ -- TALL KNIGHT: We are now no longer the Knights Who Say Ni! ONE KNIGHT: Ni! OTHERS: Sh! ONE KNIGHT: (whispers) Sorry. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 /// \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///