def print_matches
      match_count = @matches.length
      if match_count == 0
        print_error 'NO MATCHES'
      else
        return unless VIM::Window.select(@window)
        unlock
        clear
        @window_width = @window.width # update cached value
        desired_lines = [match_count, @min_height].max
        desired_lines = [max_lines, desired_lines].min
        @window.height = desired_lines
        matches = []
        (0...@window.height).each do |idx|
          text = match_text_for_idx(idx)
          @reverse_list ? matches.unshift(text) : matches.push(text)
        end
        matches.each_with_index do |match, idx|
          if @@buffer.count > idx
            @@buffer[idx + 1] = match
          else
            @@buffer.append(idx, match)
          end
        end
        lock
      end
    end
def print_matches
      match_count = @matches.length
      if match_count == 0
        print_error 'NO MATCHES'
      else
        return unless VIM::Window.select(@window)
        unlock
        clear
        @window_width = @window.width # update cached value
        desired_lines = [match_count, @min_height].max
        desired_lines = [max_lines, desired_lines].min
        @window.height = desired_lines
        matches = []
        (0...@window.height).each do |idx|
          text = match_text_for_idx(idx)
          @reverse_list ? matches.unshift(text) : matches.push(text)
        end
        matches.each_with_index do |match, idx|
          if @@buffer.count > idx
            @@buffer[idx + 1] = match
          else
            @@buffer.append(idx, match)
          end
        end
        lock
      end
    end
Print all matches.