Navigation Menu

Skip to content

Commit

Permalink
Removed a redundant if statement, and added a forgotten splat
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimm committed Jan 20, 2009
1 parent f09e450 commit 04b3773
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions objc_completion2.rb
Expand Up @@ -769,9 +769,10 @@ def return_type_based_c_constructs_suggestions(mn, search, show_arg, typeName)
c = e[0].split("\t")[3].match(/[A-Za-z0-9_]+/)[0]
c == typeName
end
candidates = temp unless temp.empty?
candidates = temp unless temp.empty?
end
arg_types = candidates.map{|e| e[0].split("\t")[5+mn.count(":")]} unless candidates.empty?
arg_types = candidates.map{|e| e[0].split("\t")[5+mn.count(":")]}
end
types = [arg_types.uniq.to_set]
Expand All @@ -792,7 +793,7 @@ def return_type_based_c_constructs_suggestions(mn, search, show_arg, typeName)
end
if show_arg
candidates.insert(0, arg_types)
candidates.insert(0, *arg_types)
end
# puts candidates.inspect.gsub(",","\n")
TextMate.exit_show_tool_tip "No completion available" if candidates.empty?
Expand Down

0 comments on commit 04b3773

Please sign in to comment.