bugvile, a vi-compatible text editor - Bugs: bug #21315, tagnames with tilde do not work...

 
 

bug #21315: tagnames with tilde do not work with ^], but do with :tag

Submitter:  Gerry Fredette <gfredette>
Submitted:  Wed 10 Oct 2007 03:29:59 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 10 Oct 2007 09:58:43 PM UTC, comment #1: 

It can be made to handle that (without modifying the
editor itself that is).  Starting with 9.5m, the tag
matching from the screen uses the identifier-expr pattern
which defaults to '\w\+'.  That is a buffer-mode, so
it can be changed either globally, or per-majormode.
For instance you could change it to something like

'\([~]\?\<\w\+\>\)*'

or even

'\<\w\+\>\(::[~]\?\<\w\+\>\)*'

to match only class::function stuff.

Thomas Dickey <dickey>
Group administrator
Wed 10 Oct 2007 03:29:59 PM UTC, original submission:  

Assume you have a file foo.cpp that contains the following:
problem tagging to destructor
class foo {
 foo::bar() { }
 foo::~bar() { }
};

Using Exuberant ctags 5.6 using command "ctags -R --excmd=n" this source file generates tags that look like this (sans the !_ comments):

foo     foo.cpp 2;"     c       file:
foo     foo.cpp 3;"     f       class:foo::foo  file:
~foo    foo.cpp 4;"     f       class:foo::foo  file:

Placing cursor on ~foo and hitting ^] actually tags to foo (i.e. line 2 not line 4).  Entering ^A-^] gets you to line 3, but entering it a third time fails to find the destructor.

Using :tag ~foo properly gets you to line 4.

Is there any way to get ^] to not ignore the ~ character?

Gerry Fredette <gfredette>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dickey (Posted a comment)
  • -email is unavailable- added by gfredette (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-09-09 dickey StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code