# File lib/rbreadline.rb, line 5528
  def _rl_insert_char(count, c)
    return 0 if (count <= 0)

    incoming = ''

    if @rl_byte_oriented
      incoming << c
      incoming_length = 1
    else
      @pending_bytes << c
      if _rl_get_char_len(@pending_bytes) == -2
        return 1
      else
        incoming = @pending_bytes
        @pending_bytes = ''
        incoming_length = incoming.length
      end
    end

    if(count>1)
      string = incoming * count
      rl_insert_text(string)
      string = nil
      return 0
    end

    if @rl_byte_oriented
      # We are inserting a single character.
      #If there is pending input, then make a string of all of the
      #pending characters that are bound to rl_insert, and insert
      #them all.
      if (_rl_any_typein())
        _rl_insert_typein(c)
      else
        rl_insert_text(c)
      end
    else
      rl_insert_text(incoming)
    end

    return 0
  end