This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #114 handle
ctags -n
jumping to symbol
symbols-view expects there to be patterns in `tags` files. This is the default behavior when running ctags (you can also explictly set it with the -F, or --excmd=pattern options). When running ctags with the number option (-n or --excmd=number), e.g ctags -R -n, numbers are used instead of patterns to identify lines. This package should expect and accept both formats. To determine which format a tag uses, check if tag.pattern and tag.lineNumber represent the same number. If so create a Point based on line number instead of pattern. `node-ctags` populates the tag.pattern parameter with the stringified lineNumber if `ctags -n` is run. When a tag has a pattern instead of a lineNumber, tag.LineNumber defaults to 0, and comparison to parseInt(tag.pattern) (NaN) returns False. An additional test fixture was added for tags generated using the `ctags -R -n`.
- Loading branch information
1 parent
a785dc7
commit a186434
Showing
4 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
function saySorry() { | ||
return "I'm sorry"; | ||
} | ||
|
||
var isItTooLate = saySorry(); | ||
|
||
var didIletYouDown = true; | ||
|
||
function redeemOhReedeem() { | ||
return !didIletYouDown; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ | ||
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ | ||
!_TAG_PROGRAM_AUTHOR Darren Hiebert /[email protected]/ | ||
!_TAG_PROGRAM_NAME Exuberant Ctags // | ||
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ | ||
!_TAG_PROGRAM_VERSION 5.8 // | ||
didIletYouDown sorry.js 7;" v | ||
redeemOhReedeem sorry.js 9;" f | ||
saySorry sorry.js 1;" f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters