Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Go To Declaration doesn't work when the line contains \ #256

@gosukiwi

Description

@gosukiwi

Prerequisites

Description

When the definition I want to go has a \, it can't navigate there using symbols-view:go-to-declaration.

So when the tagfile looks like this:

< MyClass	test/class_one.rb	/^class MyClass # rubocop:disable Metrics\/ClassLength$/;"	c

It doesn't work, but when it looks like this:

> MyClass	test/class_one.rb	/^class MyClass$/;"	c

It does. Here you can find a more detailed explanation.

Steps to Reproduce

  1. Have a class declaration (in this case in Ruby) that also has a comment with a / so it gets escaped:
class Foo # rubocop:disable Metrics/ClassLength
  def foo
    1
  end
end
  1. Create another class that uses the first one, and generate a tagfile using universal ctags
class Bar
  def bar
    obj = Foo.new # <- go to declaration doesn't work for `Foo`
    obj.foo # <- go to declaration works for `foo`
  end
end

Expected behavior:

When stepping on Foo and trigering go-to-declaration, it should navigate to it's declaration

Actual behavior:

When stepping on Foo and trigering go-to-declaration, nothing happens

Reproduces how often:

Always

Versions

Atom 1.50.0
Symbols View 0.118.4

Additional Information

Here is the related original issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions