#664 ctags is not matched on strings with backslashes

open
nobody
None
5
2010-06-22
2010-06-22
Maxim Yanchenko
No

Suppose I have a function with a comment after the name, containing a backslash, like this:
void f() /// \todo rewrite
exuberant tags converts backslashes to double backslashes, so in the tags file it becomes
f file /^void f() \/\/\/ \\todo rewrite$/;" f

When I try to find this in NEdit, I receive the following error: "Definition for f not found in <file>"

This is because NEdit in the function fakeRegExSearch changes the regexp and adds additional backslashes so the regexp finally contains \\\\todo, that of course can't be found.
The fix is to change the line
} else if(strchr("()-[]<>{}.|^*+?&\\", *inPtr)
to
} else if(strchr("()-[]<>{}.|^*+?&", *inPtr)

Discussion

  • diff againts NEdit 5.5