def display_matches(matches)
_rl_move_vert(@_rl_vis_botlin)
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
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 (@rl_completion_display_matches_hook)
send(@rl_completion_display_matches_hook,matches, len, max)
return
end
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