Skip to content

Commit

Permalink
Merge pull request #271 from aycabta/fix-autocomplete
Browse files Browse the repository at this point in the history
Fix documentation feature of autocomplete
  • Loading branch information
aycabta committed Aug 30, 2021
2 parents 06ac0d5 + 7c2abc1 commit 82d6eee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/irb/input-method.rb
Expand Up @@ -325,12 +325,15 @@ def auto_indent(&block)
cursor_pos_to_render, result, pointer = context.pop(3)
return nil if result.nil? or pointer.nil?
name = result[pointer]
name = IRB::InputCompletor.retrieve_completion_data(name, doc_namespace: true)

driver = RDoc::RI::Driver.new
begin
name = driver.expand_name(name)
rescue RDoc::RI::Driver::NotFoundError
return nil
rescue
return nil # unknown error
end
doc = nil
used_for_class = false
Expand All @@ -347,6 +350,8 @@ def auto_indent(&block)
driver.add_method(doc, name)
rescue RDoc::RI::Driver::NotFoundError
doc = nil
rescue
return nil # unknown error
end
end
return nil if doc.nil?
Expand Down

0 comments on commit 82d6eee

Please sign in to comment.