1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/irb] Don't show doc when pointer is negative

https://github.com/ruby/irb/commit/48af34bfc2
This commit is contained in:
aycabta 2021-08-31 04:26:41 +09:00 committed by git
parent 83a744dd8c
commit 16cf2ef6f2

View file

@ -323,7 +323,7 @@ module IRB
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)