Skip to content

Commit 48af34b

Browse files
committed
Don't show doc when pointer is negative
1 parent a1fc68a commit 48af34b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/irb/input-method.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def auto_indent(&block)
323323
return nil
324324
end
325325
cursor_pos_to_render, result, pointer = context.pop(3)
326-
return nil if result.nil? or pointer.nil?
326+
return nil if result.nil? or pointer.nil? or pointer < 0
327327
name = result[pointer]
328328
name = IRB::InputCompletor.retrieve_completion_data(name, doc_namespace: true)
329329

0 commit comments

Comments
 (0)