To: vim-dev@vim.org Subject: Patch 6.1.347 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.347 Problem: When using cscope to list matching tags, the listed number is sometimes not equal to what cscope uses. (Vihren Milev) Solution: For cscope tags use only one table, don't give tags in the current file a higher priority. Files: src/tag.c *** ../vim61.346/src/tag.c Wed Jan 29 22:08:43 2003 --- src/tag.c Sun Feb 16 16:05:01 2003 *************** *** 1676,1719 **** */ if (match) { ! /* Decide in which array to store this match. */ ! is_current = test_for_current( #ifdef FEAT_EMACS_TAGS ! is_etag, #endif ! tagp.fname, tagp.fname_end, tag_fname); #ifdef FEAT_EMACS_TAGS ! is_static = FALSE; ! if (!is_etag) /* emacs tags are never static */ #endif ! { #ifdef FEAT_TAG_OLDSTATIC ! if (tagp.tagname != lbuf) /* detected static tag before */ ! is_static = TRUE; ! else #endif ! is_static = test_for_static(&tagp); ! } ! /* decide in which of the six table to store this match */ ! if (is_static) ! { ! if (is_current) ! mtt = MT_ST_CUR; ! else ! mtt = MT_ST_OTH; ! } ! else ! { ! if (is_current) ! mtt = MT_GL_CUR; else ! mtt = MT_GL_OTH; } - if (regmatch.rm_ic && !match_no_ic) - mtt += MT_IC_OFF; - if (match_re) - mtt += MT_RE_OFF; if (ga_grow(&ga_match[mtt], 1) == OK) { --- 1676,1730 ---- */ if (match) { ! #ifdef FEAT_CSCOPE ! if (use_cscope) ! { ! /* Don't change the ordering, always use the same table. */ ! mtt = MT_GL_OTH; ! } ! else ! #endif ! { ! /* Decide in which array to store this match. */ ! is_current = test_for_current( #ifdef FEAT_EMACS_TAGS ! is_etag, #endif ! tagp.fname, tagp.fname_end, tag_fname); #ifdef FEAT_EMACS_TAGS ! is_static = FALSE; ! if (!is_etag) /* emacs tags are never static */ #endif ! { #ifdef FEAT_TAG_OLDSTATIC ! if (tagp.tagname != lbuf) ! is_static = TRUE; /* detected static tag before */ ! else #endif ! is_static = test_for_static(&tagp); ! } ! /* decide in which of the sixteen tables to store this ! * match */ ! if (is_static) ! { ! if (is_current) ! mtt = MT_ST_CUR; ! else ! mtt = MT_ST_OTH; ! } else ! { ! if (is_current) ! mtt = MT_GL_CUR; ! else ! mtt = MT_GL_OTH; ! } ! if (regmatch.rm_ic && !match_no_ic) ! mtt += MT_IC_OFF; ! if (match_re) ! mtt += MT_RE_OFF; } if (ga_grow(&ga_match[mtt], 1) == OK) { *** ../vim61.346/src/version.c Thu Feb 20 21:36:44 2003 --- src/version.c Thu Feb 20 21:38:58 2003 *************** *** 608,609 **** --- 612,615 ---- { /* Add new patch number below this line */ + /**/ + 347, /**/ -- FATHER: Did you kill all those guards? LAUNCELOT: Yes ... I'm very sorry ... FATHER: They cost fifty pounds each! "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 /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///