Skip to content

Commit

Permalink
[ruby/irb] Don't show doc when pointer is negative
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta authored and matzbot committed Aug 30, 2021
1 parent 83a744d commit 16cf2ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/irb/input-method.rb
Expand Up @@ -323,7 +323,7 @@ def auto_indent(&block)
return nil
end
cursor_pos_to_render, result, pointer = context.pop(3)
return nil if result.nil? or pointer.nil?
return nil if result.nil? or pointer.nil? or pointer < 0
name = result[pointer]
name = IRB::InputCompletor.retrieve_completion_data(name, doc_namespace: true)

Expand Down

0 comments on commit 16cf2ef

Please sign in to comment.