Skip to content

vir doens't select inner ruby block #14

Open

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.

Activity

  1. nelstrom commented on Aug 12, 2013

    @nelstrom
    Owner

    That's valid Ruby is it? Well, patches welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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