# File ../lib/fox/undolist.rb, line 269
    def trimCount(nc)
      if @undolist.size > nc
        numRemoved = @undolist.size - nc
        @undolist[0, numRemoved].each { |command| @size -= command.size }
        @undolist[0, numRemoved] = nil
        @marker = nil if (@marker != nil && @marker > @undolist.size)
      end
    end