Skip to content

Commit

Permalink
Rename a variable "dialog" with "autocomplete_dialog"
Browse files Browse the repository at this point in the history
Because it's just used to receive data from the autocomplete dialog, not
for show doc dialog.
  • Loading branch information
aycabta committed Aug 30, 2021
1 parent 61fe6cf commit f8b752b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/irb/input-method.rb
Expand Up @@ -322,7 +322,7 @@ def auto_indent(&block)
if just_cursor_moving and completion_journey_data.nil?
return nil
end
cursor_pos_to_render, result, pointer, dialog = context.pop(4)
cursor_pos_to_render, result, pointer, autocomplete_dialog = context.pop(4)
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 Expand Up @@ -360,7 +360,7 @@ def auto_indent(&block)
str = doc.accept(formatter)

x = cursor_pos_to_render.x + 40
y = cursor_pos_to_render.y + pointer - dialog.scroll_top
y = cursor_pos_to_render.y + pointer - autocomplete_dialog.scroll_top
DialogRenderInfo.new(pos: Reline::CursorPos.new(x, y), contents: str.split("\n"), bg_color: '49')
}

Expand Down

0 comments on commit f8b752b

Please sign in to comment.