# File lib/rbreadline.rb, line 6670
  def display_matches(matches)
    # Move to the last visible line of a possibly-multiple-line command.
    _rl_move_vert(@_rl_vis_botlin)

    # Handle simple case first.  What if there is only one answer?
    if matches[1].nil?
      temp = printable_part(matches[0])
      rl_crlf()
      print_filename(temp, matches[0])
      rl_crlf()
      rl_forced_update_display()
      @rl_display_fixed = true
      return
    end

    # There is more than one answer.  Find out how many there are,
    #   and find the maximum printed length of a single entry.
    max = 0
    i = 1
    while(matches[i])
      temp = printable_part(matches[i])
      len = fnwidth(temp)

      if (len > max)
        max = len
      end
      i += 1
    end
    len = i - 1

    # If the caller has defined a display hook, then call that now.
    if (@rl_completion_display_matches_hook)
      send(@rl_completion_display_matches_hook,matches, len, max)
      return
    end

    # If there are many items, then ask the user if she really wants to
    #   see them all.
    if (@rl_completion_query_items > 0 && len >= @rl_completion_query_items)

      rl_crlf()
      @rl_outstream.write("Display all #{len} possibilities? (y or n)")
      @rl_outstream.flush
      if (get_y_or_n(false)==0)
        rl_crlf()

        rl_forced_update_display()
        @rl_display_fixed = true

        return
      end
    end

    rl_display_match_list(matches, len, max)

    rl_forced_update_display()
    @rl_display_fixed = true
  end