Skip to content

vir doens't select inner ruby block #14

@Kache

Description

@Kache

using this example:

module Test
  def self.something(x)
    something_else(5) do
      puts "b"
    end
  end

  def something_else(x, &block)
    y = 1
    if x > 2
      if x + y > 5 then puts "a" else block.call end
    end
  end
end

Put cursor on y = 1 and use the vir command in normal mode.

Result: Lines inside the whole module are selected.

Expected: Lines inside the something_else method should be selected

Additional note: If the if then else end block is removed, this problem no longer occurs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions