Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation feature of autocomplete #271

Merged
merged 2 commits into from
Aug 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/irb/input-method.rb
Original file line number Diff line number Diff line change
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